Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...First Set of Nodes - DDRMenuFirst Set of Nodes - DDRMenu
Previous
 
Next
New Post
11/27/2011 6:01 PM
 

In the DDRMenu, I'd like to customize the display of the first set of nodes (top parent nodes?). Right now, I have the following code I've modified slightly from the ULXSLT template. The case is, my parent nodes are empty pages (most of the time). To get my example working as designed, I am checking if the Node is Enabled. If not, it wraps a stylized DIV and doesn't include the A HREF. However, on occasion the top level parent node is Enabled or a child node is Disabled. I only want to wrap the same stylized DIV around first level parents, Enabled or not.

<xsl:template match="node">
<li>
<xsl:attribute name="class">
<xsl:if test="@first = 1">first</xsl:if>
<xsl:if test="@last = 1">
<xsl:text>&#32;</xsl:text>last
</xsl:if>
<xsl:if test="@selected = 1">
<xsl:text>&#32;</xsl:text>selected
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@enabled = 1">
<a href="{@url}">
<xsl:value-of select="@text" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@first = 1">
<div class="nav-head-first">
<xsl:value-of select="@text" />
</div>
</xsl:when>
<xsl:otherwise>
<div class="nav-head">
<div class="nav-head-inner">
<xsl:value-of select="@text" />
</div>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="node">
<ul>
<xsl:apply-templates select="node" />
</ul>
</xsl:if>
</li>
</xsl:template>

I am new to XSLT but I'm learning as quickly as I can! Thanks.

 
New Post
11/28/2011 3:09 AM
 

I have an example for this in the ddrmenu wiki

http://www.dotnetnuke.com/Resources/Wiki/Page/DDRMenu-Tips-Tricks.aspx#Different_levels_different_HTML_1 

 

 
New Post
12/16/2011 3:56 PM
 

That example works great. Is there a way to ignore a node level based upon the number of levels displayed? I'd like to use the same template for two different cases depending upon the number of levels. If 2 levels, apply X style to level 1 and Z style to level 2. If 3 levels, apply X to level 1, Y to level 2, and Z to level 3. Does that make sense?

<xsl:choose>
            <xsl:when test="$level=0">
            <!-- Your html-->
            </xsl:when>
            <xsl:when test="$level=1"> (and # of levels > 2)
                <!-- Your html-->
            </xsl:when>
            <xsl:otherwise>
 
New Post
12/19/2011 10:20 AM
 
mm that's an interesting question will put it on todo list
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...First Set of Nodes - DDRMenuFirst Set of Nodes - DDRMenu


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out