Developer forum

Forum » Templates » ecom xslt
Peter Bille Larsen
Reply

Does anyone have a good ecom xslt based on LIClean?

I have great one, but I suddenly cant make it work. The ecom module page is ID=28, but output is absolutely nothing. What is wrong?

The tag is <ul id="leftNavigation" class="dwnavigation" settings="startlevel:1;template:LIClean_leftmenu_0000BP.xslt"></ul>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

   <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"  encoding="utf-8" />
  <xsl:param name="html-content-type" />

  <xsl:template match="/NavigationTree">
    <ul id="leftmenu" class="l1">
      <xsl:apply-templates select="Page[@ID=28]/Page" />
    </ul>
  </xsl:template>

  <xsl:template match="Page">

    <xsl:variable name="RelativeLevel" select="'RelativeLevel '" />
    <xsl:variable name="activeitem" select="'activeitem '" />
    <xsl:variable name="inpath" select="'inpath '" />
   
   
    <xsl:variable name="classes">
      <xsl:if test="@Active='True'">
        <xsl:value-of select="$activeitem" />
      </xsl:if>
      <xsl:if test="@InPath='True'">
        <xsl:value-of select="$inpath" />
      </xsl:if>
    </xsl:variable>

 
    <li>
      <a>
        <xsl:attribute name="class">
          <xsl:value-of select="normalize-space($classes)" />
        </xsl:attribute>
        <xsl:attribute name="href">
          <xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/>
        </xsl:attribute>
        <xsl:value-of select="@MenuText" disable-output-escaping="yes"/>
      </a>
      <xsl:if test="@InPath='True' and Page">
        <ul class="M{@AbsoluteLevel}">
          <xsl:apply-templates select="Page" />
        </ul>
      </xsl:if>
    </li>
   
  
 
  </xsl:template>

  <xsl:template name="generatedwtag">
    <xsl:param name="tagname" />
    <xsl:comment>
      <xsl:value-of select="concat('@', $tagname)" />
    </xsl:comment>
  </xsl:template>

</xsl:stylesheet>

 


Replies

 
Yury Zhukovskiy
Reply
Peter, provide please link to the page.
 
Peter Bille Larsen
Reply

Hi Yury

[url removed]
 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer
Hi Peter

Have a look at the sticky thread in the templates category:
http://developer.dynamicweb-cms.com/forum/templates.aspx

Votes for this answer: 0
 
Peter Bille Larsen
Reply

sweet.. 

 

You must be logged in to post in the forum