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
Hi,
Im trying to check if a page node existing when using the content picker data type. So if a page is deleted, then the link is not outputted.
Any help would be grateful.
Martin
@inherits Umbraco.Web.Mvc.UmbracoViewPage <div> @Umbraco.Field(Model, "callToActionContent") @if(Model.HasValue("callToActionButtonLink")){ var button = Model.GetPropertyValue<IPublishedContent>("callToActionButtonLink"); <div class="btn"> <a href="@button.Url">Contact »</a> </div> } </div>
Hi Martin i think you should do something like this
@inherits Umbraco.Web.Mvc.UmbracoViewPage <div> @{ var button = Model.GetPropertyValue<IPublishedContent("callToActionButtonLink"); } @if(button != null){ <div class="btn"> <a href="@button.Url">Contact »</a> </div> } </div>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Check if ID is still valid in content picker
Hi,
Im trying to check if a page node existing when using the content picker data type. So if a page is deleted, then the link is not outputted.
Any help would be grateful.
Martin
Hi Martin i think you should do something like this
is working on a reply...