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
Has anyone used a picker with razor and want to share an example? For example getting some propertyvalues from a dataholder pagetype?
Best regards / Niklas
You can use the XSLT extensions in razor. For example this should work:
umbraco.library.NiceUrl(Model.propertyName)
Jeroen
Hi,
How would you do this with a property with a hyphen i've tried
umbraco.library.NiceUrl(node.GetProperty("asl-MasterTour").Value)
However this doesn't appear to work
Thanks
John
The full section of code is below, but still won't work:
if(node.template > 0) { <url> @if (node.HasProperty("asl-MasterTour")) { var masterUrl = Model.NodeById(node.GetProperty("asl-MasterTour").Value).Url; if (masterUrl != "") { <loc>@GetUrlWithDomainPrefix(masterUrl )</loc> }else { <loc>@GetUrlWithDomainPrefix(node.Url)</loc> } } </url> }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Contentpicker with razor example?
Has anyone used a picker with razor and want to share an example? For example getting some propertyvalues from a dataholder pagetype?
Best regards / Niklas
You can use the XSLT extensions in razor. For example this should work:
Jeroen
Hi,
How would you do this with a property with a hyphen i've tried
However this doesn't appear to work
Thanks
John
The full section of code is below, but still won't work:
is working on a reply...