@Model is equivalent to the "currentPage" in xslt, so you can use that one to get hold of the current node. And yes, it's a dynamic object, so you won't have intellisense in vs.net, but any custom property can be retrieved using @Model.propertyAlias or @Model.GetProperty("propertyAlias").Value
currentpage in Razor
what method are you using to obtain the "current page"?
at the moment we have a helper extension method to convert the dynamicNode to an iNode.
i.e. var currentPage = @CurrentModel.ToNode();
is there any preferred method?
Andrew,
@Model is equivalent to the "currentPage" in xslt, so you can use that one to get hold of the current node. And yes, it's a dynamic object, so you won't have intellisense in vs.net, but any custom property can be retrieved using @Model.propertyAlias or @Model.GetProperty("propertyAlias").Value
Hope this helps.
Regards
/Dirk
hi Dirk, yes thats a good point, i probably should have mentioned that i understand that concept in my first post :)
i guess what im trying to understand is why @model is a 'dynamicNode' and not an iNode? thanks
is working on a reply...