Suggestion: Expanded help with Menu options

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
2/14/2011 10:51:08 AM
Gravatar
Total Posts 5

Suggestion: Expanded help with Menu options

Joe and all, I'm really struggling with menus since greybox came in with Version 2.3.4.1

My main issue revolves around the sonofsuckerfish taking over all my menus.

Here is my goal:

Full site map in list form.  Nothing hides (except pages the user doesn't have permission for).  Visible even on default.aspx, displaying like (well, indented appropriately):

  • area 1
  • area2
  • ***subarea2a
  • ******subarea2a.1
  • ******subarea2a.2
  • ***subarea2b
  • area3
  • ***subarea3a
  • area4
  • ***subarea4a
  • ***subarea4b

I have read the documentation and tried a myriad of configurations.

 

Here are the critical sections of my layout.master:

<asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false" />
            <asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" />
            <asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" />
            <asp:SiteMapDataSource ID="level3datasource" runat="server" ShowStartingNode="true" /> 

 

<portal:SiteMenu id="SiteMenu3" runat="server"
    UseTreeView="false"
    UseSuperfish="false"
    TopLevelOnly="false"
    StartingNodeOffset="1"
    DynamicDisplayLevels="3"
    Direction="Vertical"
    SiteMapDataSource="SiteMapData">
    </portal:SiteMenu>

 

I have tried many versions of the options in SiteMenu3.  The greybox javascript always takes over and forces hiding of sublists with class AspNet-Menu-WithChildren and AspNet-Menu, and then adds the css or javascript that shows it.  You can see what I'm talking about at http://www.undeclared.casa.colostate.edu/academic-resources.aspx or any other page in our site.  Just click 'Navigation' in the upper right-hand corner.

My secondary issue is that the menus don't appear when referencing default.aspx directly - the sitemapdata source seems to be returning an empty list.  To counter that, I have added a simple piece of jquery when a user lands on that page, but that's not a great solution for users with js disabled:

$(document).ready(function() {  // all the jQuery on load stuff :)
   
    if (window.location.pathname.length < 3 || window.location.pathname == '/Default.aspx' || window.location.pathname == '/default.aspx')
        window.location = "http://www.undeclared.casa.colostate.edu/home.aspx";

   
});

 

I think I just need more information about all the individual parameters you can supply to the portal:SiteMenu tag, and what each one does and interacts with the other parameters.

 

Thanks in advance!

Mike Brake

2/15/2011 1:17:50 PM
Gravatar
Total Posts 18439

Re: Suggestion: Expanded help with Menu options

Hi Mike,

I agree we could use some better documentation for the menu options, just not sure how soon that will happen.

To make a vertical menu styled indented I would set UseTreeView=true and then just apply css, similar to what we have on the Site Map.

We have a lot of different menu configuration examples in the included skins, though I admit I can't think of one using treeview for the main menu, we used to have some like that and I think the jwv1 skin on this page uses a treeview and may be a good example for the menu but is not up to date for other aspects of the skin.

I don't recommend using multiple instances of SiteMenu and the one instance needs to have the id SiteMenu1, for additional menus add PageMenu1, PageMenu2, PageMenu3

None of the included skins have any problem highlighting correctly whether the home page is / , /Default.aspx, or /home.aspx as far as I know.

I suggest looking at skins we ship and find ones that have a menu structure similar to what you want including the presence of SiteMapData sources for each level when using multiple menus. The SiteMapDataSources have to have the correct ids on them as well that is expected by th emenu and the menu has to initialize the data for the sitemapdatasource, so if you are using mutliple menus you should make sure you use the same meun ids and sitemapdatsources as other skins that have the same number of menus.

When we get a chance we do have a to do item to add more documentation about menus.

Best,

Joe

2/15/2011 9:55:05 PM
Gravatar
Total Posts 5

Re: Suggestion: Expanded help with Menu options

Good tips - I'll see what I can do with it.

I had tried the treeview="true" and it was displaying only the first layer, same as what's happening now, except that on hover the submenu items were appearing directly below, overlapping the rest of the tree.

I have a couple more ideas now.  Really, I want to disable the javascript that is targetting AspNet-Menu items located in

/ClientScript/mojocombined.js

which I can do by deleting the lines out of the appropriate .js file, but if there is an attribute that supresses it, so much the better.

I'm still working out what is going on with the main menu not appearing, but again I have ideas.  To see the issue in action:

http://www.undeclared.casa.colostate.edu/deFAULT.aspx

vs

http://www.undeclared.casa.colostate.edu/home.aspx

Same code, same page, but for some reason the SiteMap is returning different results.

Anyway, I'll write back as I debug it more.  Thanks for everything you do!  Mojoportal is amazing - this is just me running into issues with the details because I don't understand what is happening under the hood yet.  Time to go dig.

You must sign in to post in the forums. This thread is closed to new posts.