Quick Nav:  Online Store   |   Login | Register

WithActiveParent

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
llong
<100 Posts
Posts:96


03/23/2008 4:34 PM  

John,
I'm missing something here

I have two menus in a skin - one for global top level and on for child-of-parent links.  The code is:


      id="TopTabs"
    Level="0-0"
    Type="Tabs"
    IncludeTabs="Things to do,Plan Your Visit,Resources,Press Room"
    CacheTabs="false"
    runat="server"
  />

and

I tried various settings; what you see is the last incarnation.  However, the page consistently shows all top level tabs and never shows the childs links.  This is a child portal, just for testing.

Any ideas?

 

John Mitchell
Posts:3276


03/23/2008 4:39 PM  

Did you forget to set the Level(s) in the child menu?

llong
<100 Posts
Posts:96


03/24/2008 12:09 PM  

I tried a mix of levels but logically I didn't follow how they would apply.  For instance, in this context, would level="0-0" mean "all levels from the selected parent down"?   Does the zero now represent the parent node?

Either way, the variations of level values I tried didn't make a difference.  What do you recommend would be best?

John Mitchell
Posts:3276


03/24/2008 12:44 PM  
The Level setting is a range of levels. "0-0" means start at level 0 and finish at level 0, or in other words only use the root level.

For a child menu you could put Level="1-99".

llong
<100 Posts
Posts:96


03/24/2008 4:28 PM  
John,

The new level setting and a bit of fooling around worked. Hover, because the levels are not nested, I have to move to a template solution. According to the docs, WithActiveParent will only work with type Tabs. I though I might be able to fake it by fooling with the level and the css but I can't get the pure template to show.

Here is my code:

id="SubTabs"
Level="0-99" -> also tried level="1-2" and level="0"
CacheTabs="False"
NavType="Template"
TemplateFile="/Portals/33/skins/NCAC/template.txt" -> location confirmed by viewing directly in the browser.
/>

and here is my template (based on your example):

[NavMenu-Container[ ]]

It is failing silently.
llong
<100 Posts
Posts:96


03/24/2008 4:30 PM  

template as attachment...


Attachment: 1324331599571.zip

John Mitchell
Posts:3276


03/24/2008 5:19 PM  

WithActiveparent will work with templates, you'll just need to have the children in its own template if you use it.

 

llong
<100 Posts
Posts:96


03/24/2008 7:30 PM  
Hmmm, I have now actually copied your template example but still no luck get anything to show. The content space is blank each time I try the template approach. I'm a layout control freak so I really want the templates to work.

By "children in its own template" are you referring to a relationship between top and child menu templates? Can my main nav be type "tabs" and the child menu be a template?

If templates work with the WitrhActiveParent type, would the code look like:

< Snapsis:NavMenu
id="SubTabs"
Level="1-4"
CacheTabs="False"
NavType="WithActiveParent"
TemplateFile="/Portals/33/skins/NCAC/template.txt"
runat="server"
/>
John Mitchell
Posts:3276


03/24/2008 7:47 PM  

You may be getting an error if you check in the Event Viewer.
If the template.txt file is in the same skin folder then you can specify it without the full path (TemplateFile="template.txt") which allows it to be portable.

The id of the submenu needs to have associated CSS so there should be several css classes for #SubTabs

Yes, the main menu instance can be of type tabs with the child menu being type template.
You can mix & match however you want as each menu definition is it's own instance.

Instead of NavType="WithActiveParent" it should be Show="WithActiveParent" and NavType="Template"

llong
<100 Posts
Posts:96


03/24/2008 8:06 PM  
Sure enough, the doc relative template address works. May I suggest the documentation outline this in the variable description section?

Thanks for the help, I should have it from here.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.



ActiveForums 3.7
Powered by: Snapsis Software