Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello there,
I need to hide the following hyperlink when the field is empty, please advise, and thank you for your help.
<a href="@Umbraco.Field("collCatalog")">Catalog</a>
I usually prefer to get my values from @Model.Content
There you'll have stuff like:
@if (Model.Content.HasValue("collCatalog")) { <a href="@Model.Content.GetPropertyValue("collCatalog", "-defaultValue-")">Catalog</a> }
Awesome, a million thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Hide element when Field is null
Hello there,
I need to hide the following hyperlink when the field is empty, please advise, and thank you for your help.
I usually prefer to get my values from @Model.Content
There you'll have stuff like:
Awesome, a million thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.