USkinned - get page name or title from ComponentOutro
Umbraco 8.17.1 using uSkinned Wireframe
I have a button, for example in the Outro section of a Grid component. This uses the Partials/MiscPageElements/ComponentOutro partial. I want to get the title of the overall page, or its name or onPageTitle.
In other partials like pods I can use:
@inherits USNStarterKit.ViewPages.USNViewPage<USNBlock>
var content = (Usn_Pb_TextImage)Model.BlockContent;
strQS = content.PodHeading.Text;
But that doesn't work in this case because it's not inheriting USNBlock. Code of the Partial is as follows
USkinned - get page name or title from ComponentOutro
Umbraco 8.17.1 using uSkinned Wireframe
I have a button, for example in the Outro section of a Grid component. This uses the Partials/MiscPageElements/ComponentOutro partial. I want to get the title of the overall page, or its name or onPageTitle.
In other partials like pods I can use:
But that doesn't work in this case because it's not inheriting USNBlock. Code of the Partial is as follows
Thanks
@inherits USNStarterKit.ViewPages.USNViewPage
@{
}
Have a look at the view that calls ComponentOutro.cshtml
~/Views/Partials/uSkinned/BlockContainers/ComponentSection.cshtml
You can pass anything you like into this view as ViewData
Cheers,
Marc
Thanks a million Marc - makes so much sense now you say it! Thanks for the prompt reply.
Hi
You can also get it like this from within ComponentOutro view:
Kind regards
Paul
Nice one @Paul Seal, never thought of that.
is working on a reply...