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 have a class that needs to know the CurrentPage? I can get access to the UmbracoHelper by doing this in my class
var uHelper = new UmbracoHelper(UmbracoContext.Current);
How do I get the CurrentPage
can you pass the current page to your class?
public static IPublishedContent YourMethod(IPublishedContent currentPage) { //Your Code Here! }
Not sure which version it was implemented in, but you've got uHelper.AssignedContentItem if Umbraco found some content on the current url.
Thanks for the comments. I managed to get around it with a bit of a hack :)
Hi Lee,
It would be nice to have your work around here as that can be used by other people in case they need it!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 6 Get CurrentPage From Custom Class?
I have a class that needs to know the CurrentPage? I can get access to the UmbracoHelper by doing this in my class
How do I get the CurrentPage
can you pass the current page to your class?
Not sure which version it was implemented in, but you've got uHelper.AssignedContentItem if Umbraco found some content on the current url.
Thanks for the comments. I managed to get around it with a bit of a hack :)
Hi Lee,
It would be nice to have your work around here as that can be used by other people in case they need it!
is working on a reply...