umbraco 6 MVC form data hidden variable "uformpostroutevals"
hi
I notice that umbraco is maintaining form data in "uformpostroutevals". Is there a helper/provider class for this info that I can use from within a controller action?
basically, I would like know the umbraco context of the form i.e. a content id or something in that form variable that the content id can be derived from eg url.
in a controller action I could use UmbracoContext.PageId to grab the current id, but is there a convience method/helper to get the current IPublishedContent?
Ultimately, what I want to do is obtain the top level content node that the current page sits under.
I want to do this by walking back up the content hierarchy i.e. IPublishedContent.AncestorOrSelf("myAlias")
I know there is “ContentService.GetRootContent()” but that won't be accurate when theres multiple root nodes i.e. a multilingual site. I guess another option is to use GetRootContent() and then check for a certain descendent, but the performance is likely to be horrible.
umbraco 6 MVC form data hidden variable "uformpostroutevals"
hi
I notice that umbraco is maintaining form data in "uformpostroutevals". Is there a helper/provider class for this info that I can use from within a controller action?
basically, I would like know the umbraco context of the form i.e. a content id or something in that form variable that the content id can be derived from eg url.
thanks
in a controller action I could use UmbracoContext.PageId to grab the current id, but is there a convience method/helper to get the current IPublishedContent?
Ultimately, what I want to do is obtain the top level content node that the current page sits under.
I want to do this by walking back up the content hierarchy i.e. IPublishedContent.AncestorOrSelf("myAlias")
I know there is “ContentService.GetRootContent()” but that won't be accurate when theres multiple root nodes i.e. a multilingual site. I guess another option is to use GetRootContent() and then check for a certain descendent, but the performance is likely to be horrible.
my controller is a surface controller, so I ended using:
SurfaceController.CurrentPage
and this to find the homepage for the current IPublishContent:
var currentHomePage = CurrentPage.AncestorOrSelf("HomePage");
hope that helps someone else.
is working on a reply...