This is going to drive me crazy at this rate. From inside of a Layout.cshtml file for a theme in Orchard, how can I determine the Title of the main body's contents?
I've tried using the Shape Tracer but it doesn't seem to help. None of these give me any text at all.
@Html.Title()
@Model.Title
@Model.Content.Parts_Common_Body.ContentItem.TitlePart
@Model.ContentItem.Parts_Common_Body.ContentItem.TitlePart
UPDATE: Here's the HTML which should show what the end result needs to look like to keep the theme intact, along with a picture showing the theme before I started with it. This HTML is just a snippet of the parts that I'm concerned with. In the picture, the search is what is in the ContentHeader zone.
<div id="wrapper-header-inner">
<div id="header-inner">
@Zone(Model.ContentHeader)
<h1 class="pagetitle">
Title Here
</h1>
</div><!-- #header-inner -->
</div><!-- #wrapper-header-inner -->
}
<div id="wrapper-content">
<div id="content">
@if(Model.Content != null) {
<div class="main" class="@mainContentClass">
@if(Model.Content != null && Model.LeftAside == null && Model.RightAside == null) {
<div id="maincontentFull" class="positionleft">
@Zone(Model.Content)
</div>
}
@* Other layout possabilities if left and/or right asides are present *@
</div>
}
</div>
</div>