Ok, figured it, in Umbraco v7 you can do what I posted but in v6 you have to have a additional parameter (what to return if nothing found recursively) like this:
Awesome! In case someone finds this useful in the future I should add that this Model.Content.GetPropertyValue<string>("footerPhone", true) method works in v6.2+
remove spaces
Hi, does the Umbraco library have a helper method for removing spaces from a string?
I have this dynamicaly generated url in my page:
but the W3C validation service is complaining about the spaces in the href attribute
Thanks for your help,
Anthony
No it doesn't, but how about:
Jeavon
Hi Jeavon,
Thanks, I tried this:
But I'm getting this error:
Ah sure, should be like this
does that work in a Razor template file? I'm not working in a Macro Partial File.
when I add this in Visual Studio, I'm getting this error:
I tried this, and that works:
Ok, if that works, stick with it :-) I will check on GetPropertyValue later when I have a computer (currently on iPad), but it should work perfectly.
Hey Anthony,
Ok, figured it, in Umbraco v7 you can do what I posted but in v6 you have to have a additional parameter (what to return if nothing found recursively) like this:
Nice little improvement in v7 there :-)
Jeavon
Thanks Jeavon,
works like a charm : )
greetings,
Anthony
Awesome! In case someone finds this useful in the future I should add that this
Model.Content.GetPropertyValue<string>("footerPhone", true)
method works in v6.2+is working on a reply...