Title on list page?

Topics: Customizing Orchard, Writing themes
Jul 29, 2011 at 4:13 PM

I have a custom type called "NewsClip" and a list that contains these types. The list has the route of /news/ and individual clips are at /news/clip-title. This works fine and at /news I see my list of clips. However, what I don't see is the title "News" at the top. The header for the page is empty and I can't figure out why. The template is: 

...<header>@Display(Model.Header)</header>...

I can't figure out why this doesn't have a header. Any thoughts?

Coordinator
Jul 29, 2011 at 7:58 PM

Attach a debugger and put a breakpoint there. You'll be able to peek into Model and see what's going on. Shape tracing may also help.

Aug 1, 2011 at 2:40 PM
bertrandleroy wrote:

Attach a debugger and put a breakpoint there. You'll be able to peek into Model and see what's going on. Shape tracing may also help.

Model.Header is just an empty object {}. Model.Title exists, as I would expect as "News". I have a custom Content.Detail.cshtml view that I"m using that contains the code I showed above. Where should Model.Header be populated?

Aug 1, 2011 at 5:39 PM

Interestingly, looking at the documentation at: http://www.orchardproject.net/docs/Creating-lists.ashx I see that by default list pages don't have headers. This does seem odd to me though. I guess I should just create an alternate view and set the header title there?

Coordinator
Aug 1, 2011 at 6:17 PM

We used to have a bug with the list shape where it would render nothing but the list, but I'm pretty sure it's fixed in 1.2. Did you verify the you had placement sending the title in the header zone?

Editor
Aug 10, 2011 at 1:48 AM

Did this ever get resolved? I am not seeing Titles on my list page as well. Placement.info is clean.

Coordinator
Aug 10, 2011 at 8:12 PM

Yes, this should work in 1.2.

Aug 12, 2011 at 2:51 PM

Hmm... I'm running 1.2, but this definitely isn't working.

Editor
Aug 12, 2011 at 2:58 PM
Agreed. Blank <header></header> tags are only rendered. I added an HTML section to my list type and have hand placed headers for now.

On Fri, Aug 12, 2011 at 10:51 AM, Citezein <notifications@codeplex.com> wrote:

From: Citezein

Hmm... I'm running 1.2, but this definitely isn't working.

Read the full discussion online.

To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)

To start a new discussion for this project, email orchard@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,

Arra

Coordinator
Aug 12, 2011 at 5:34 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.