asp.net - DDR Treeview Menu display selected root and its child node -
i'm working on ddr treeview menu dotnetnuke display selected root items , kid node expanded. here i'm trying achieve. (left vertical menu) advice please?
this xslt code , displaying root items.
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="html"/> <xsl:param name="controlid" /> <xsl:param name="options" /> <xsl:template match="/*"> <xsl:apply-templates select="root" /> </xsl:template> <xsl:template match="root"> <xsl:if test="node"> <ul class="treeview filetree" id="{$controlid}"> <xsl:apply-templates select="node" /> </ul> <script type="text/javascript"> jquery(function($) { $("#<xsl:value-of select="$controlid" />").treeview( <xsl:value-of select="$options" disable-output-escaping="yes" /> ); }); </script> </xsl:if> </xsl:template> <xsl:template match="node"> <li> <xsl:if test="node , (@depth != 0 or @breadcrumb = 1)"> <xsl:attribute name="class">open</xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="@enabled = 0"> <xsl:value-of select="@text" /> </xsl:when> <xsl:otherwise> <a href="{@url}"> <xsl:choose> <xsl:when test="@selected=1"> <xsl:attribute name="class">selected breadcrumb</xsl:attribute> </xsl:when> <xsl:when test="@breadcrumb=1"> <xsl:attribute name="class">breadcrumb</xsl:attribute> </xsl:when> </xsl:choose> <xsl:value-of select="@text" /> </a> </xsl:otherwise> </xsl:choose> <xsl:if test="node"> <ul style="list-item-style:none"> <xsl:apply-templates select="node" /> </ul> </xsl:if> </li> </xsl:template> </xsl:stylesheet>
if you're getting root items, you'll want alter nodeselector defined menu. believe shorthand value rootchildren give want.
asp.net xml xslt treeview dotnetnuke
No comments:
Post a Comment