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 All
How do I access the umbraco CurrentPage when inheriting MerchelloViewPage?
Thanks
I'm not using MerchelloViewPage in the project I'm working on, but it looks like it inherits from Umbraco.Web.Mvc.UmbracoViewPage, so you should be able to access the Umbraco Helper (see http://our.umbraco.org/forum/developers/api-questions/52597-What-is-the-difference-between-UmbracoViewPage-and-UmbracoTemplatePage#comment182865)
I can use something like this in a partial view via the backend:
@Umbraco.Field("pageName")
If there is a specific property or line of code that is failing, please post it so we can take a look.
What's about this one
// UmbracoContext.Current.PageId returns currentPageId
var c = Umbraco.TypedContent(UmbracoContext.Current.PageId);
Hi Thanks
With all the changes to Umbraco I get a bit lost but I managed to access it with
@Umbraco.AssignedContentItem
I managed to do it like this:
dynamic c = Umbraco.Content(UmbracoContext.Current.PageId);
and then use "c" as you would "CurrentPage" normally.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Accessing Umbraco CurrentPage when inheriting MerchelloViewPage
Hi All
How do I access the umbraco CurrentPage when inheriting MerchelloViewPage?
Thanks
I'm not using MerchelloViewPage in the project I'm working on, but it looks like it inherits from Umbraco.Web.Mvc.UmbracoViewPage, so you should be able to access the Umbraco Helper (see http://our.umbraco.org/forum/developers/api-questions/52597-What-is-the-difference-between-UmbracoViewPage-and-UmbracoTemplatePage#comment182865)
I can use something like this in a partial view via the backend:
@Umbraco.Field("pageName")
If there is a specific property or line of code that is failing, please post it so we can take a look.
What's about this one
// UmbracoContext.Current.PageId returns currentPageId
Hi Thanks
With all the changes to Umbraco I get a bit lost but I managed to access it with
@Umbraco.AssignedContentItem
I managed to do it like this:
and then use "c" as you would "CurrentPage" normally.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.