[ic] if page

Kevin Walsh interchange-users@interchange.redhat.com
Thu Apr 18 17:38:01 2002


> 
> I need to show some info in my LEFTRIGHT_TOP template based on what page the
> user is looking at.. is this possible?
> 
> I tried something like [if page blahblah]...  I'm thinking I can possibly
> declare a value based on the page name then say [if value whatever].. etc.
> 
> Anyone done this that can help? I don't see anything in the archives or
> resource site.
>
How about this:

    [if term="@@MV_PAGE@@" op="eq" compare="index"]
        We are on the index page.
    [/if]

Or this:

    [if term="@@MV_PAGE@@" op="=~" compare="/^(index|results)$/"]
        On the index or the results page.
    [/if]

Or even this:

    [if global MV_PAGE =~ /^(index|results)$/]
        On the index or the results page.
    [/if]

As ever, there is more than one way to do it.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/