IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
The following tutorial demonstrates how to add a Link selector in your widget's designer. The Link selector generates hyperlinks to a website, a page from this site, a specific anchor in the text, or an e-mail address. For more information on how to use the Link selector, see Use Link selectors in Content block widgets.
In your DesignerView.YourView.cshtml file, place one of the following tags anywhere in the HTML code:
DesignerView.YourView.cshtml
The values of the attributes are scope properties that you must add in your widgets controller.
The Link selector has an option to set a hyperlink to an anchor. To do this, you use the sf-editor-content attribute. The attribute value must contain text from which anchors can be extracted. For example, you can set the editorContent property in the scope of your designer's controller to have the following value:
sf-editor-content
editorContent
As a result, the anchors myTitle and mySpan appear in the Anchors dropdown box on the Anchor tab.
myTitle
mySpan
In the following sample demonstrates how to implement a link selector in a custom MVC widget designer.
To implement this, you use a proxy object which connect the Angular and .NET sides of the solution. In your designer view, include a proxy:
Your next task is to include the proxy object in your angular code, and then take value from the proxy object of the scope:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important