Gary Green
 Posts:20

| | 08/10/2008 7:54 AM |
| Hi, I've created some pages for a particular section of my site which contains quite a few child pages. I set all pages but the top level of this section to be hidden from the main menu. I then added a links module to the top page and added links to every page in that section and put it in the DNN right pane (DNN Blue skin). Then I labouriously added shadow copies of that module to each page to create a menu which is essentially a secondary nav for that section. Of course it only occured to me after I had done all this work that perhaps I could somehow add a second CSSNav menu to that section only. Is this possible? Thanks, Gary | | | |
|
|
|
John Mitchell Posts:3478


| | 08/13/2008 9:53 AM |
| Hi Gary,
Yes, you can have as many instances of the menu on the page as you like.
There is also a Show property that you can set to have it display only the child items of the active root item (Show="WithActiveParent"). This site is a good example of using several instances for different levels http://www.littletonpublicschools.net/ | | | |
|
Gary Green
 Posts:20

| | 08/13/2008 11:00 AM |
| John, I'm guessing from your reply that I would add the menu to the top-level page and it would appear on all the child pages by using the Show property you mentioned. And I imagine I would have to add the menu to the page code, as I did with the main menu. But, and I suppose this is more of a general DNN question: where is the page located? For instance, my top-level page, to which I want to add the second menu, has a tab ID of 116. If I search the folder structure of my site, I can't find anything with '116' in the title. In fact, I can't find any of the pages at all - am I having a conceptual breakdown? | | | |
|
Gary Green
 Posts:20

| | 08/13/2008 11:13 AM |
| Er, once the fog cleared from my brain, I realized you probably add the second menu to the same page as the main menu - you just configure it not to show on the whole site somehow...? I'm working on the somehow... | | | |
|
John Mitchell Posts:3478


| | 08/13/2008 11:20 AM |
| I may have been a little mis-leading when I use the word page instead of skin earlier.
The "pages" are all virtual and dynamically derived from combining information stored in the Database with a "Skin" that is made up of HTML for layout and "Skin Objects" for dynamic rendering of different elements that may be on several pages.
When a page is requested then the skin that is associated for that page has "modules" injected into it by DNN.
This menu is not a module that gets injected into the skin/page (like a links module), it is a "Skin Object". You put it in your skin and it dynamically generates the navigation depending on the properties that you set.
Let me know if that does not clear it up. | | | |
|
John Mitchell Posts:3478


| | 08/13/2008 11:24 AM |
| The second menu will not show at all if there are no items available because of the configuration ( a parent page with no children). You can also have different skins for different layouts. I use one skin that has navigation on the left for my home page, but I use a different skin that does not have that second menu for most of the other pages on this site. | | | |
|
Gary Green
 Posts:20

| | 08/13/2008 1:16 PM |
| Thanks for the explanation of how the pages are generated - this makes a lot of sense. I've succeeded in adding a second, identical menu to the right-hand pane. Of course, it's on all my pages because it's essentially a duplicate of the main menu. So now, how do I go about getting it to show up only on selected pages? - I have 3 top-level pages; Page 3 has several child pages. In the main menu I want all the top-level items to show, but when I click on Page 3 I don't want its child pages to appear on the main menu - I want them to appear on the second menu (and the second menu only appears when Page 3 is selected in the main menu). I'll of course be working on figuring out how to do this, but any tips would be appreciated! | | | |
|
John Mitchell Posts:3478


| | 08/13/2008 1:47 PM |
| Set the Level property of your main menu to only display the root level items (level="0-0").
Then set the Level Property of the child menu to display the levels you want on that one (i.e. level="1-4"). Also set Show="WithActiveParent" on the child menu and it will not display anything unless there are child items under the currently active parent.
| | | |
|
Gary Green
 Posts:20

| | 08/13/2008 2:15 PM |
| Ah, but is it possible to have the second menu appear only when certain main menu root level items are selected? - I can exclude tabs from showing on the second menu, but the second menu still shows up on every page. | | | |
|
Gary Green
 Posts:20

| | 08/13/2008 2:20 PM |
| You did say the second menu would only show up if the main menu items have child pages, using ShowType="WithActiveParent". But all my root pages have children, so that means the second menu will always show up. | | | |
|
John Mitchell Posts:3478


| | 08/13/2008 2:30 PM |
| If you only want this second menu to show on specific pages then you should create another skin.
Copy the skin you are using (the .ascx file that you are putting the skin objects in).
On your new skin you can include the second menu and then only apply it to pages where you want this type of layout. | | | |
|
Gary Green
 Posts:20

| | 08/13/2008 2:58 PM |
| Wow, that was a bit of a revelation - it works really well! Thanks for your help once again. Gary | | | |
|
Gary Green
 Posts:20

| | 08/14/2008 12:24 PM |
| One more small question for this thread - I've done as discussed and created a second skin in which to put a second menu. It works great, but one thing I can't seem to do is as follows: My second menu consists entirely of children of one of the top-level items on the first menu. When I click on that top-level item on the first menu, the second menu appears, but the top-level item appears in it as well. I would like the top-level item to be highlighted in the first menu for the entire time any menu item on the second menu is selected, without the top-level item showing at all on the second menu. I've tried the ShowType attributes; I've tried adding the top-level item to the ExcludeTabs of the second menu, but that stops any of the children appearing in the second menu altogether. I've tried about as many combinations of various attributes and DNN settings as I could think of, with no success. | | | |
|