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
Hi, i am writing code @{ var selection = CurrentPage.Ancestors(); } in a view(.cshtml) file and its saying "The name "CurrentPage" does not exists in current context. Please suggest.
@{ var selection = CurrentPage.Ancestors(); }
Hi,
You can use var currentPage = Umbraco.AssignedContentItem; to get the current node.
var currentPage = Umbraco.AssignedContentItem;
-Joep
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Error in accessing CurrentPage property in mvc view
Hi, i am writing code
@{ var selection = CurrentPage.Ancestors(); }
in a view(.cshtml) file and its saying "The name "CurrentPage" does not exists in current context. Please suggest.Hi,
You can use
var currentPage = Umbraco.AssignedContentItem;
to get the current node.-Joep
is working on a reply...