Thanks for the suggestions but I'm using a package called 'Doctype Grid Editor' which allows you to use partials as grid options and created doctype objects as a datatype and the partial is in the grid.
Ran into this myself - Nested Content, in general, you are rendering manually - so I was previously passing the CurrentPage in from higher up (CurrentPage.Content for IPublishedContent)
However, just recently found that this is stored in the UmbracoContext.
You can do something like this from your Partials, works great with Doctype Grid Editor
How to find current page name from partial view
I am creating a website in Umbraco and I need to get the current page's name from a partial view, could anyone help?
Here's my code:
Hi Harry,
Try to use :
Thanks
Or if you don't want dynamics, go:
@Model.Content.Name.
Thanks for the suggestions but I'm using a package called 'Doctype Grid Editor' which allows you to use partials as grid options and created doctype objects as a datatype and the partial is in the grid.
Ran into this myself - Nested Content, in general, you are rendering manually - so I was previously passing the CurrentPage in from higher up (CurrentPage.Content for IPublishedContent)
However, just recently found that this is stored in the UmbracoContext.
You can do something like this from your Partials, works great with Doctype Grid Editor
Hope that helps, -Marc
just found this post and it got me out of a bind - nice ;)
i've ended up add this to our nested content models:
works a treat!
in v8 its shorter method
is working on a reply...