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, ...DDRMenu generate text based on tabidDDRMenu generate text based on tabid
Previous
 
Next
New Post
12/2/2011 10:52 AM
 

Hi DDR gurus!

 I need a little help.  I'd like some text to be displayed under my root menu nav items based on tabid.  For example:

Root Menu Item:  About Us
Subtext: seasoned pros
Tabid: 53

Root Menu Item:  Services
Subtext:  how we can help
Tabid: 54

Is there a way to set up a test in my XSLT that will display my custom text for each menu item?  I feel like an if or when statement should do it, but I don't know XSL enough to make it work.  :(

 Many thanks!
Kelly :)

 
New Post
12/3/2011 10:02 AM
 

before giving you the more extended solution answer to this one you can do it easier by adding the text to the description of the page and then do a value-of select="description"

your solution 

first add a new tempalte block to the xsl

<xsl:template name="getSubText">
<xsl:param name="tabid" />
<xsl:choose>
<xsl:when test="$tabid=53">
seasoned pros
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:template>

now you can call it from your xsl

<xsl:call-template>
<xsl:with-param name="tabid" select="@id" />
</xsl:call-template>

If I didn't make an error typing this by head, this one should do the trick

 

 
New Post
12/3/2011 4:31 PM
 

Thanks once again, Armand!  You are a DDR Guru!

I thought about using the description, but I need it for SEO.  Thank you for pointing it out as an option, though.

Your solution is a huge help!  Thanks so much!

Kelly :)

 
New Post
12/3/2011 5:51 PM
 

Hi

 

no problem glad to help, just show the result when you are done

 
New Post
12/5/2011 9:23 AM
 

I had to make a few tiny tweaks, but it worked like a charm!  Will post a link once the site is out of production.  Thanks again!

 Here's the final code for those interested:

<xsl:template name="getSubText">
<xsl:param name="tabid" />
<xsl:choose>
<xsl:when test="$tabid=57">
<xsl:text>first menu item subtext</xsl:text></xsl:when>
<xsl:when test="$tabid=58"><xsl:text>second menu item subtext</xsl:text></xsl:when>
<xsl:when test="$tabid=83"><xsl:text>third menu item subtext</xsl:text></xsl:when>
<xsl:when test="$tabid=84"><xsl:text>fourth menu item subtext</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:template>

 

<xsl:call-template name="getSubText">
<xsl:with-param name="tabid" select="@id" />
</xsl:call-template>

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...DDRMenu generate text based on tabidDDRMenu generate text based on tabid


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