Reading time: 2 min read
Link Field Does Not Display If "Description" AKA Anchor Text Has No Value
But Sometimes You Want To Display a Link With No Visible Text
Start typing to search...
But Sometimes You Want To Display a Link With No Visible Text
,[object Object],
,[object Object],
,[object Object],
@if (ViewHelper.IsEditMode())
{
@* Render the field directly in edit mode so that the user can visually modify the links *@
,[object Object],
}
else
{
@* Preview or Normal modes *@
@* Ensure the link field has a URL which will be used to determine whether or not the link should be displayed *@
@* Use the authored link anchortext or a default value if it is not set *@
if (!String.IsNullOrWhiteSpace(Model.TwitterLinkRaw))
{
,[object Object],
}
}
All the very best, Marcel