Products

Solutions

Learn More

Partners

Community

Blog

About

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, ...Main Menu Drop-Down NavigationMain Menu Drop-Down Navigation
Previous
 
Next
New Post
1/18/2017 5:20 PM
 

I am making edits to an existing DNN site.  I changed the look of the main menu to use a drop down menu.  The issue I'm having is that not all of the menu items have a sub-menu.  For example, I have a menu item named "Home" and "Contact Us" with no items below it, and when I click on "Home" nothing happens.  The menu items with sub-items work; when I click on one of them the drop-down shows up and when I click one of the sub-items I am taken to the correct page.

So my question is, how do I fix this?  I'm thinking the issue is with the code in the nav.xslt file, but I'm not really sure.  Anyone else come across this issue?

Here is the contents of the nav.xslt file:

<?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:template match="/Home">
<xsl:apply-templates select="root" />
</xsl:template>

 <xsl:template match="root">

<ul class="nav navbar-nav">
<xsl:apply-templates select="node">
<xsl:with-param name="level" select="0"/>
</xsl:apply-templates>
</ul>

</xsl:template>

 <xsl:template match="node">
<xsl:param name="level" />
<xsl:choose>
<xsl:when test="$level=0">
<li>
<xsl:attribute name="class">
<xsl:if test="@breadcrumb = 1">active</xsl:if>
<xsl:if test="node">
<xsl:text>&#32;dropdown</xsl:text>
</xsl:if>


</xsl:attribute>
<xsl:choose>
<xsl:when test="@enabled = 1">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<xsl:attribute name="class">
<xsl:if test="node">
<xsl:text>dropdown-toggle</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:if test="node">
<xsl:attribute name="data-toggle">dropdown</xsl:attribute>
</xsl:if>
<xsl:value-of select="@text" />
<xsl:if test="node">
<b class="caret"></b>
</xsl:if>
</a>
</xsl:when>
<xsl:otherwise>

<xsl:value-of select="@text" />

</xsl:otherwise>
</xsl:choose>
<xsl:if test="node">
<ul class="dropdown-menu">
<xsl:apply-templates select="node">
<xsl:with-param name="level" select="$level + 1" />
</xsl:apply-templates>
</ul>
</xsl:if>
</li>
</xsl:when>
<xsl:otherwise>
<li>
<xsl:attribute name="class">
<xsl:if test="@breadcrumb = 1">active</xsl:if>
<xsl:if test="node">
<xsl:text>&#32;dropdown</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@enabled = 1">
<a href="[email protected]}">
<xsl:value-of select="@text" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@text" />
</xsl:otherwise>
</xsl:choose>
</li>
<xsl:if test="node">
<!-- no extra level in default bootstrap -->
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>



                       

 

 
New Post
1/18/2017 8:39 PM
 
please check "disabled" state of the pages (in page settings)

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/19/2017 1:04 PM
 

Shows it is not disabled:

If if change the nav.xslt file - around line 36 it use to be:

  <a href="#" class="dropdown-toggle" data-toggle="dropdown">

I tried changing it to:   <a href="[email protected]}" class="dropdown-toggle" data-toggle="dropdown">

and then the menu items without sub-items started working, but then the menu items with sub-items don't really work, since as soon as I click on it, the site just does a post-back as the menu expands, not giving you a chance to select any of the sub-items.

 
New Post
1/19/2017 6:19 PM
 
do you experience same behavior on a page, where you applied DNN default skin?

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/10/2017 2:15 PM
 

Hi

Does anyone know how to Disable page (as top menu item so only expand sub item) in DNN 9.0.2 ?

This option was in old versions (before 9.0.0).

thanks

Nokhaz.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Main Menu Drop-Down NavigationMain Menu Drop-Down Navigation


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.
DNN Launch Webinar
VIEW ON-DEMAND
DNN Launch Webinar
VIEW ON-DEMAND
DNN Launch Webinar
VIEW ON-DEMAND