Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
You can create a block for this, or add an additional target frame property to your page/block. This is an example of the block approach.
[ContentType(AvailableInEditMode = false)] public class PageLinkBlock : BlockData { public virtual ContentReference Link { get; set; } [UIHint("TargetFrame")] public virtual int? TargetFrameRaw { get; set; } public string TargetFrame { get { if (TargetFrameRaw.HasValue) { var frame = EPiServer.DataAbstraction.Frame.Load(TargetFrameRaw.Value); return frame.Name; } return null; } } }
The view can look something like this:
@model PageLinkBlock @Html.ContentLink(Model.Link, null, new { target = Model.TargetFrame })
On your page/block:
public virtual PageLinkBlock MyLink { get; set; }
Hi,
I am using EPiServer 9 version. I have used Content Reference and URL types for Link URLs. But in these EPiServer does not give built in option for the editors to choose to open a link in same or new window. This option extists for LinkItemCollection and Link in TinyMCE editor.
Could anyone tell me how can I make a ContentRefrence or URL to give such option. And if it is not possible any other solution or work around to solve this limitation?
Thanks in advance.
Sanket Mahimkar