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, ...differentiate classes for DDR Menu superfish templatedifferentiate classes for DDR Menu superfish template
Previous
 
Next
New Post
8/22/2011 3:51 PM
 
Hi,

We're using th superfish template (DDR Menu) and we need the first (the most left) option at the top level to have  a different class than the rest of options. How should we modify the template to get this? I guess it must be quite easy but we've been unable to figure it out.

Thank you. Regards,
Francisco  
 
New Post
8/22/2011 6:47 PM
Accepted Answer 
you dont mention what type of menu (xslt/razor) but essentially you have to check both the depth (make sure it equals 0) and the first properties - http://www.dotnetnuke.com/Resources/Wiki/Page/DDRMenu-Razor-templates.aspx or http://www.dotnetnuke.com/Resources/Wiki/Page/DDRMenu-token-templates.aspx should help. There are other ways of course e.g. you could target the tabid if you know it in advance - and im sure Mark has smarter ways to do this :)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/20/2011 2:09 AM
 
Here is my way of doing it
 
You need to modify the node template like this
 
<xsl:template match="node">
        <xsl:param name="level" />
 
and also how you call it
 
<xsl:template match="root">
         
            <xsl:apply-templates select="node">
                <xsl:with-param name="level" select="0"/>
            </xsl:apply-templates>
 
    </xsl:template>
 
and
 
<xsl:apply-templates select="node">
                                <xsl:with-param name="level" select="$level + 1" />
                            </xsl:apply-templates>
 
 
and then you can use level in your template like
 
<xsl:attribute name="class"><xsl:value-of select="$level"/></xsl:attribute>
 
New Post
9/20/2011 2:23 AM
 
Ooh i misread ( well at least you have another trick i your arsenal )

what you want is

<xsl:if test="@first = 1">your class full attribute or just class name here</xsl:if>

and then in your css ( since you only want to style one item differently )

.sf-menu > li.yourclassname
{
background-color:lime;
}

 
New Post
11/14/2013 11:29 PM
 

Hi, I am trying to accomplish something similar to this but I want a multicolor menu... using the Superfish DDR XSL template.

[Menu Item 1=Red]   [Menu Item 2=Blue]   [Menu Item 3=Yellow]  and so on..

 Any ideas how to create this template?

 Thanks!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...differentiate classes for DDR Menu superfish templatedifferentiate classes for DDR Menu superfish template


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