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, ...How to remove the span tags from HTML outputs of DNN controls?How to remove the span tags from HTML outputs of DNN controls?
Previous
 
Next
New Post
2/4/2011 7:23 AM
 
Hey guys,

I'm pretty new to using DotNetNuke and not very familiar with certain aspects of the framework and its code structure yet.
Therefore, I would like to apologize for maybe asking stupid questions upfront. ^^
But now to my problem...

I have installed DNN 5.6.0 about 2 weeks ago, read and watched some tutorials about installation, administration and skinning, and then created my own skin in the default portal of the installation.
Except of a few difficulties due to my lack of knowledge everything worked pretty well, but now I'm starting with using and customizing  the ASP.NET control tags for some parts of the website.

In particular, I'm using
<dnn:NAV runat="server" id="dnnNAV" ProviderName="DNNMenuNavigationProvider" Level="root" ... />
in order to create the main menu on top of the site.

Now my problem with the resulting output is, that DNN wraps several <span> tags around the actual nodes of the main menu.
For example:
<span id="dnn_dnnNAV_ctldnnNAV" class="" tabindex="0" style="-moz-user-select: none;">
    <span id="dnn_dnnNAV_ctldnnNAVctr36" class=" sel  bc mi mi0 id36 root first last firstlast">
        <span class="icn"></span>
        <span id="dnn_dnnNAV_ctldnnNAVt36" class="txt" style="cursor: pointer;">Home</span>
    </span>
</span>

However, I would like to produce an output in the HTML markup like this:
<ul id="mainmenu">
    <li class="menuitem first">
        <a href="#">Lorem</a>
    </li>
    <li class="menuitem active">
        <a href="#">Ipsum</a>
    </li>
    <li class="menuitem">
        <a href="#">Dolor</a>
    </li>
    <li class="menuitem">
        <a href="#">Sit</a>
    </li>
    <li class="menuitem last">
        <a href="#">Ahmet</a>
    </li>
</ul>
but I still can't figure out where to change what in order to produce this output.

Every kind of help with this issue would be greatly appreciated. :)
Thanks in advance and kind regards,

Chris
 
New Post
2/4/2011 8:32 AM
 

Chris

To get the default menu provider to render the menu as list, take a look at this example skin by timo: http://dnnskinextensions.codeplex.com/releases/view/42217

You'll need to add this to the top of the skin.ascx file:

<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.Skins" Assembly="DotNetNuke" %>

and then use something like the following for the nav code (it can vary depending on what you're trying to achieve):

<dnn:nav id="dnnNAV" providername="DNNMenuNavigationProvider" runat="server" csscontrol="nostyle" ControlOrientation="Horizontal" IndicateChildren="false">
<CustomAttributes>
<dnn:CustomAttribute Name="RenderMode" Value="UnorderedList" />
</CustomAttributes>
</dnn:NAV>

Hope this helps,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
New Post
2/6/2011 7:58 AM
 
Hi Rick,

thanks for your answer.
I didn't know yet that it is possible to add custom attributes to some of the DNN control tags.
The demo skin shows exactly what i intended to do and thus it was very helpful and solved my problem. ;)

Kind regards,
Chris
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...How to remove the span tags from HTML outputs of DNN controls?How to remove the span tags from HTML outputs of DNN controls?


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