page title 1 & 2

Topics: Writing themes
Oct 1, 2013 at 6:06 PM
Hi all,
In my MVC project I have a title and subtitle in my theme, like this:
  @if (ViewBag.TitleText1 != null)
                    <section id="page-title" class="message-container span12">
                        @if (ViewBag.TitleText2 != null)
How would I translate this to Orchard? I suppose the first step would be adding fields to the Page and then making a zone?
    @if (Model.PageHeader != null)
        <div class="container">
What now?
Oct 1, 2013 at 6:39 PM
Yes, create a field, update placement in your theme, and maybe override the field template to get the markup exactly as you want it.
Oct 1, 2013 at 7:32 PM
How :) I understand the placement, but how do I display this field? I have no idea in what to do.
Oct 2, 2013 at 1:47 AM
Placement puts the shape for the field into the zone. There is nothing more to do in principle. What happens when you do that? Show your placement and say where it is.
Oct 2, 2013 at 9:23 AM
Ok, I think I'm getting it. I'll have 2 properties on my object: Title 1 and Title 2 (so Common Title and Subtitle for example)
I just have to both place them in my zone PageHeader and style them seperately.
Sorry, I was thinking about a more complex situation to fill in this problem.