On 05/03/2009, at 4:19 PM, Mohit Sindhwani wrote:
1. In my Normal layout I use the page title as h1 element (sometimes as a link, sometimes as just a heading). However, I wish _not_ to have a h1 title on the home page only. I am not sure how to achieve this.
Hi Elle,

I'm not going to answer your question :)

My strong recommendation would be to have a different home page layout. The reason for this is that in most cases, the home page is completely different in the way that other pages are done. You would save yourself a lot of conditional stuff if you just separated that out.


Of course, your question is still relevant for other reasons and I hope you get an answer (I'll take a look at the details later myself).


In most cases, I completely agree with you Mohit :). However, in this case, the layout is exactly the same: one #main column, one #sidebar -- I only want to hide h1 heading on the home page.

After reading your email, I would actually be really happy if there was a tag such as <r:page_id /> because then I could use if as:
<body class="page_<r:page_id />">
And then I can use the body.page_xxx to hide my title as well as control other page specific aspects while still using just one layout.

I found this:
http://www.mail-archive.com/radiant@radiantcms.org/msg02969.html
so, using the conditional extension I could use:
<r:puts value_for="id" />

But, any chance this is now part of Radiant? I had a quick look at standard_tags.rb but couldn't see it.
Actually, have my answer for q1. I used:
<r:unless_url matches="^/$"> <!-- any page other then home page -->
   <!-- any page other then blog area  -->
    <r:unless_url matches="^/journal/.+">
      <h1><r:title /></h1>
    </r:unless_url>

   <!-- any page in the blog area -->
<r:if_url matches="^/journal/.+"><r:unless_url matches="-archives/ $">
      <h1><r:link /></h1>
      <r:snippet name="posted" />
    </r:unless_url></r:if_url>

    </r:unless_url>


Cheers,
Elle
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to