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'm trying to get the value of a property on a page in umbraco 5.
I'm getting the root node using:
var rootNode = currentPage.AncestorsOrSelf.Last();
I can get the value of the property using:
var x = rootNode.myProperty;
But suppose the 'myProperty' was in a string variable, how would I be able to get the value of the property?
I need this too.
Please advise.
Did you tried:
var rootNode = DynamicModel.AncestorsOrSelf.Last();
Not tested, but how about:
string myProperty = "whatever";@Umbraco.Field(currentPage, myProperty);
-Tom
I've tried that but it doesnt work.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get property from page in v5 when property is a variable.
I'm trying to get the value of a property on a page in umbraco 5.
I'm getting the root node using:
I can get the value of the property using:
But suppose the 'myProperty' was in a string variable, how would I be able to get the value of the property?
I need this too.
Please advise.
Did you tried:
Not tested, but how about:
-Tom
I've tried that but it doesnt work.
is working on a reply...