Re: [campsite-support] Check home page
  • Simple way is to look at the URL requested and validate from there.

    More elaborated way and, imho, much better is like follows:
    (IMPORTANT: It depends on how your site templating has been
    structured)

    For example, let's say you have an index.tpl template file, there you
    include a top navigation menu template like this:

    {{ include file="top_nav_menu.tpl" is_index=true }}

    ... notice the is_index variable declaration. Then, in the
    top_nav_menu.tpl template file you can do this:

    {{ if $is_index }}
    ... show here the code with specific stylish...
    {{ /if }}

    That works if you use different template files to display sections,
    articles, etc. If user is visualizing an article, then (let's say)
    article.tpl will be the template file doing the job... it includes
    top_nav_menu.tpl, but the declaration is only like this:

    {{ include file="top_nav_menu.tpl" }}

    ... so, no index. Then the specific stylish for home page in the
    top_nav_menu.tpl template file won't be rendered.


    Hope this helps,



    On Tue, Mar 23, 2010 at 1:31 PM, wrote:
    > Author: Terix
    > Link: