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, ...Indicate that root menu item has childrenIndicate that root menu item has children
Previous
 
Next
New Post
8/2/2012 8:33 AM
 

Hello there!

 I'm using the DNN NAV SkinObject in one of my skins, and I'm trying to achieve the following: If a menu node is selected AND has children, a different CSS class should be applied. I tried using this:

<div id="nav1">
                    <dnn:NAV
                        runat="server"
                        id="NAV1"
                        ProviderName="DNNMenuNavigationProvider"
                        ForceCrawlerDisplay="true"
                        ControlOrientation="horizontal"
                        ControlAlignment="right"
                        CSSControl="nav_root_1"
                        CSSNode="ni"
                        PopulateNodesFromClient="true"
                        IndicateChildren="true"
                        CCSIndicateChildRoot="children"
                        ExpandDepth="1"
                    />
</div>

 And in the CSS:

#nav1 .sel.children{font-weight:bold;background:url('images/arr.png') no-repeat center 0px;}

However I figured that wouldn't work, as the children class is given to the image created by the IndicateChildren boolean.

 Can any of you guys help me out? :-)

Tom Joosten.

 
New Post
8/2/2012 9:52 AM
 

This is probably not the answer you want, but you shouldn't use the NAV menu any more.

User DDR menu instead, it's much better and can mimic the  NAV menu.

More information in the Wiki http://www.dotnetnuke.com/Resources/W...

 
New Post
8/2/2012 11:05 AM
 

Hello Timo,

Thanks for your reply, although I'm not sure how to use the DDR menu. I see it has created a list of items, one of which has the class="selected breadcrumb". How can I add the class "children" to this if the node has children? :-)

 Tom Joosten

 
New Post
8/2/2012 12:24 PM
 

I would change the XSLT for that.
If you need a regular UL list download the ULXSLT example here and add this for the <il> and <a> elements:

<xsl:attribute name="class">
...
<xsl:if test="child::*"> HasChildren</xsl:if>
...
</xsl:attribute>

 
New Post
8/2/2012 1:23 PM
 
Thank you, that worked. I think I'm on the path to finishing this, as my selected (with children) element now has the classes I wanted it to have. Just some finishing-touches and I'll be done!
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Indicate that root menu item has childrenIndicate that root menu item has children


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