Developer forum

Forum » Templates » Ecom group checking if should be showed in menu

Ecom group checking if should be showed in menu


Reply
Hey

Im adding new products to an ecom group but it shouldnt be showed yet in the menu, i have crossed them off in the settings page, but how do i check for it in the xslt ?

Replies

 
Reply

Hi,

Some while ago (at least) Dw did not output the xml when adding savexml=true to the URL in eCom menus, so I did some digging and used this:

<xsl:template match="Group">
  <xsl:param name="depth"/>
  <xsl:apply-templates select="@*"/><br/>
  <xsl:if test="count(Group)">
    <xsl:apply-templates select="Group">
      <xsl:with-param name="depth" select="$depth+1"/>
    </xsl:apply-templates>
  </xsl:if>
</xsl:template>
 

<xsl:template match="@*">
  <xsl:value-of select="name()"/>=<xsl:value-of select="."/><br/>
</xsl:template>

This template will give you all the attributes in all the nodes and subnodes in the group menus.

//nuno

 
Paul Nilsson
Reply
Is it not possible to get the group number?

 

You must be logged in to post in the forum