Getting Page Id in Theme Overriding

Topics: Customizing Orchard, Writing themes
Nov 21, 2012 at 4:48 AM

Hey there,

I'm overriding the default theme in orchard and I would like to include the current being served page Id on the Layout.cshtml file. Is anyone able to help me on this please ?

Many thanks for your help.

 

Justin.

Coordinator
Nov 22, 2012 at 8:34 PM

You won't be able to do it in layout because that shape has no idea what is going to be displayed in the Content zone. Now from the template of any part you can do something like @Model.ContentItem.Id.