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
I have a site using Umbraco 7 .12 so we are using related links until I can update it to 7.15 to use Multi URL Picker reliably. I know Umbraco 8 has been out and 9 is on the way, but the site is huge and will be a very large undertaking for right now.
When using the Related Links, is there a way to use the "umbracoNaviHide" property to tell if a page is published or unpublished so that my editors don't have a bunch of dead links handing around.
Same for the Multi URL Picker? If a page becomes unpublished will the link then become a dead link if chosen as an internal page internal to the Umbraco system.
Here's an example for multi url, just add the where visible and it will check for the umbracoNaviHide property.
var typedMultiNodeTreePicker = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("propertyAlias", true);
foreach (var item in typedMultiNodeTreePicker.Where("Visible"))
Would that actually work if the URL is grabbed from the URL property?
What about external links? Would the "Where" be null? Or just bypass it?
I didn't think about that. You'd probably want to check for external links or you could end up with a null object reference error?
@UmbracoHQ (if you all take a look at this),
I see in the Umbraco 8.1+ documentation I see that the Multi URL Picker allows for the LnkType.ExternalURL and LinkType.Content ...
Are those properties available in the View to use to tell the difference between an External link vs a Content node?
It is not documented in the Umbraco 7.14+ or the 8.0+ version of the documentation.
I’ve had good luck tweeting @ hq before.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted