PDA

View Full Version : MTVT: IF confusion


hanzo
06-26-06, 12:43 AM
hi,

i am having a bit of trouble wrapping my head around the control statement tags. the documentation is far from thorough with regards to how to do certain things, so hopefully one of you can point me in the right direction.

basically, i want my navigation bar to change depending on what page i am on...

for example, if i am on the storefront, my home button will be a different graphic and will not be clickable, whereas if i were on any other page, the home button would be a default graphic and would be clickable. i guess this could apply to regular text links as well, but i am using graphics for the nav.

the code control statements i came up with look something like this:

<mvt:if expr="Screen EQ SFNT">
<img src="images/home-on.gif">
<mvt:else>
<a href="blah"><img src="images/home-off.gif"></a>
</mvt:if>


anyone have any idea why this won't work? i have a feeling the expr statement is pretty wrong, but like i said, i couldn't find the supporting documentation to outline what i wanted to do.

thanks in advance for any help

wcw
06-26-06, 12:48 AM
<mvt:if expr="g.Screen EQ 'SFNT'">
<img src="images/home-on.gif">
<mvt:else>
<a href="blah"><img src="images/home-off.gif"></a>
</mvt:if>


The SFNT is a string so you need to enclose it with the single quote marks.

hanzo
06-26-06, 01:01 AM
excellent.. thanks a lot.