Forums

Registration

Click here to register. Registration is required if you want to post to the forums.

If you register, we can also contact you with news on new module versions, and upgrades to new modules as we make them available. 

Use of your registration information is subject to our privacy policy.

Inventua Forums

Subject: MenuHdr class after currentItemHighlight not working
Prev Next
Topic is locked

Author Messages
a h
Posts:8

13 May 2008 10:58 AM  

Hi guys, newbie here..

 

I'm having an issue with the SideMenu when I set the property "Show current sub-tree only" on and source = [Top Ancestor].

 

Say I have the following menu structure:

 

Channel A

    Sublevel A1

    Sublevel A2

Channel B

    Sublevel B1

    Sublevel B2

Channel C 

    Sublevel C1

    Sublevel C2

Channel D

    Sublevel D1

    Sublevel D2

Channel E 

    Sublevel E1

    Sublevel E2

 

If Sublevel B2 is the current item, the pages after that (Channel C,D,E) are being assigned the MenuItem class, not MenuHdr (confirmed viewing page source from browser). Channel A and Channel B before that are rendered correctly. For example:

 

Channel A (with menuhdr style)

Channel B (with menuhdr style)

    Sublevel B1 (with menuitem style)

    Sublevel B2 (with currentItemHighlight style)

Channel C (with menuitem style)

Channel D (with menuitem style)

Channel E  with menuitem style)

 

This is my current CSS:

 

.MenuHdr
{

    font-size: 12px;
    padding-left: 12px;
    padding-bottom: 3px;
    padding-top: 10px;
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #99cc66;
    background-image: url(images/nasoft_vienta.gif);
    background-repeat: no-repeat;
    background-position: 0px 14px;
    list-style-type: none;
   
}
.MenuItem {
    padding-left: 12px;
    padding-bottom: 3px;
    padding-top: 10px;
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #99cc66;
    background-image: url(images/nasoft_interior_menu_fondo.jpg);
    background-color: #f7f7f7;
    background-repeat: repeat-x;
    background-position: bottom;
    list-style-type: none;
}

.MenuItemMouseOver
{
    padding-left: 12px;
    padding-bottom: 3px;
    padding-top: 10px;
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #99cc66;
    background-repeat: no-repeat;
    background-position: 0px 14px;
    list-style-type: none;
    color: #6b9d3a;
}
.currentHeaderHighlight {
    font-size: 12px;
    padding-right: 0px;
    padding-left: 0px;
    margin-right: 15px;
    margin-left: 15px;
}
.currentItemHighlight {
    padding-bottom: 3px;
    padding-top: 10px;
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #99cc66;
    background-repeat: no-repeat;
    background-position: 0px 14px;
    list-style-type: none;
    color: #6b9d3a;
}

 

Btw, the currentHeaderHighlight  class is not being rendered either, but that's not as important.

Please help..this is the only thing stopping me from having this working at 100%. Thanks in advance.

Anthony Glenwright
Posts:11087

13 May 2008 11:18 AM  
Pages are "headers" if the sidemenu is showing child pages, or "items" if they don't have children - and when you set "current sub-tree only", it only shows the level of menus and the current page's sub-tree - but the top level items outside of the current sub-tree have "no children" in this context.

For the display that (I think) you want, try using source=[Dual] & turning current sub-tree only off.
a h
Posts:8

13 May 2008 11:29 AM  

Thanks for your prompt response.

The top level items after the current item do have children, as do the ones before it, but only the top level items before it are displayed as headers, not the ones after it. In other words, it's rendering the following top level items as children of the current one. I hope I'm making sense.

I tried your suggestion but it's showing all the top level items and it's children expanded, where I want to only expand the children of the currently selected top level item.

 

 

Posted By Anthony Glenwright on 13 May 2008 11:18 AM
Pages are "headers" if the sidemenu is showing child pages, or "items" if they don't have children - and when you set "current sub-tree only", it only shows the level of menus and the current page's sub-tree - but the top level items outside of the current sub-tree have "no children" in this context.

For the display that (I think) you want, try using source=[Dual] & turning current sub-tree only off.

 

 

 

 

Anthony Glenwright
Posts:11087

13 May 2008 11:38 AM  
The top level items may have children, but because of your selection, they are not being rendered. The item/header "decision" is made based on what will be rendered, not the "actual" condition of whether the page has children or not.

a h
Posts:8

13 May 2008 11:47 AM  
I understand what you're saying, but I don't understand then why the previous toplevel items (Channel A & B) are rendered correctly as headers, but not the ones after the current item (Channel C,D & E).

Is there a way to display the parent and "uncles" of the current menu item, but only expand the children of the current parent, like the menu at http://www.innomate.com/dk/ ?

Thanks!

Anthony Glenwright
Posts:11087

13 May 2008 12:16 PM  
Have a quick look in the admin->pages screen in DNN, and make sure the relationshits beween pages are what you expect.
a h
Posts:8

13 May 2008 12:22 PM  
the hierarchies are correct, they're displaying correctly with Inventua's Top Menu, it's only with sidemenu with which I'm having issues.
Anthony Glenwright
Posts:11087

13 May 2008 12:47 PM  
In that case, I can't explain why "Channel A" is displaying as a header item, I was expecting you to find that "channel B" was a child of "channel A", which would be why both appear as "headers".

You can style items individually - do a "view source", and you will see that it renders an id="invsidemenu-[YOURPAGENAME]" for each. If the number of "top" level items is fairly low, you can use CSS like #invsidemenu-channelc {your css} to style your page titles in the sidemenu.
a h
Posts:8

14 May 2008 1:04 AM  
Channel A &B displaying as headers is how innomate.com is displaying their menu, and viewing their source it seems it was done with nothing fancy. Is it too complicated to get it displayed the same? Thanks!!
Anthony Glenwright
Posts:11087

14 May 2008 10:09 AM  
I believe the Innomate site uses the [dual] source option, with "levels" set to "2" (or something like that, I don't know what their settings are, I am only guessing).
a h
Posts:8

14 May 2008 10:45 AM  
thanks, I'll give it a try
a h
Posts:8

14 May 2008 10:58 AM  
I was able to get the sidemenu to display as I wanted by activating the 'add level to class name' option then dicking around with css file.
Topic is locked
Forums > Inventua Forums > DotNetNuke Modules/Components Support > MenuHdr class after currentItemHighlight not working



ActiveForums 3.7