Hi
Is there a way to use the IF to test if a page has a given page ID of if a menu has any content?
ex:
< !--@If Defined(DwPageID==2702)-- >
OR can the only be used to tell if a variabel has a value.
Hi
Is there a way to use the IF to test if a page has a given page ID of if a menu has any content?
ex:
< !--@If Defined(DwPageID==2702)-- >
OR can the only be used to tell if a variabel has a value.
The 'If Defined' can only tell you if a tag is available or not.
// Sebastian
My issue is that I have a top menu 1. niv, and have a left menu on the 2. niv.
This is how I have tried to solve it, but i doses not work.
<div class="content">
<!--@If Defined(DwPageID==2702)-->
<div style="float:left;">
<!--@2ni
</div>
<!--@EndIf(DwPageID==2702)-->
<!--@DwContent-->
</div>
Do you have a way to get this to work :)
I would definately go for an XSLT template instead.
That would be the only way to check for a specific ID unless you wanna use Javascript.
// Sebastian
Super. I just converted the templeate using the button in hte editor. And after a litle ajustment, I got this :) <
div class="content">xsl:if test="DwPageID!=2702">div style="float:left;">xsl:value-of select="leftmenu" disable-output-escaping="yes"/>div>xsl:if>xsl:value-of select="DwContent" disable-output-escaping="yes"/>div>
Thanks for pointing i the right direction
<
<
<
</
</
<
</
Super.
I just converted the templeate using the button in hte editor.
And after a litle ajustment, I got this :)
<div class="content">
<xsl:if test="DwPageID!=2702">
<div style="float:left;">
<xsl:value-of select="leftmenu" disable-output-escaping="yes"/>
</div>
</xsl:if>
<xsl:value-of select="DwContent" disable-output-escaping="yes"/>
</div>
Thanks for pointing i the right direction
Hello,
I've just tryed this and it did not work 4 me :(
<xsl:if test="DwPageID!=10142">
<xsl:attribute name="href"><xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/></xsl:attribute>
<xsl:value-of select="@MenuText" disable-output-escaping="yes"/>
</xsl:if>
and
<xsl:if test="DwPageID=10142">
<xsl:attribute name="href"><xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/></xsl:attribute>
<xsl:value-of select="@MenuText" disable-output-escaping="yes"/>
</xsl:if>
same result - no output :/
Am I missing something here?
You must be logged in to post in the forum