2 level menus, Edit admin controls

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.
6/12/2008 4:17:28 AM
Gravatar
Total Posts 11

2 level menus, Edit admin controls

Hi,
I am just getting started with Mojoportal and so far I like what I see! The best CMS for .net i've tried yet. However, I have a couple of questions. I've googled this forum and the developer docs I found but I can't seem to find the answer.

2 level menu
I want to make a menu that only shows the first 2 levels in a menu. That is, if I have:

Link 1
- Link 2
- - Link 3

Only link 1 and 2 should be visible. I can do this by CSS:

        li.AspNet-Menu-WithChildren    .AspNet-Menu-WithChildren ul {
            display: none;   
        }

But I really don't think it's the best idea.

Edit admin controlls
When you are logged on as an administrator you will see the "Administratormenu, Add page, Edit page layout" and so forth. Where is the source code for this included? I would like to change it's appearence, namely the icons to be more inituative (and I can't change the icons themselves because the same icons are used on several pages in different context. So if I edit the icon one place will be correct, but the other will be wrong.

Any help would be very appreciated!

Regards,
Niklas

6/12/2008 8:15:33 AM
Gravatar
Total Posts 18439

Re: 2 level menus, Edit admin controls

Hi Niklas,

On your first question I would say the mojoportal SiteMenu and page menu are not implemented to support this. You could implement your own menus based on the mojoportal ones and then use them in your layout.master and you could implement support for the level structures you require. SiteMenu and PageMenu are just wrappers around the ASP.NET menu and TreeView controls which I do believe offer control over depth of binding etc. Alternatively, if you want to try and modify the existing SiteMenu or PageMenu to meet your needs and you send me your work I will consider integrating it.

In hindsight, SiteMenu and PageMenu could have been combined into one control with various configuration options but they evolved separately. Internally there are only a few differences between them and SiteMenu is meant to be the topmost menu.

As for the edit icons I have had an internal debate for a long time about whether they should be skinnable. To date the argument has been won by the no they are not part of the skin side of the argument. Basically this point of view is that the edit icons are not visible to normal users but only to those with edit prviledges and the idea is that they should be small as possible to minimize them from having any impact on the layout of the skin but not so small they they are hard to find. With in place editing the idea is that the editor sees it as close as possible to the way the public user sees it so the idea of unobtrusive small icons prevails. Also for the purposes of training users how to use mojoportal with videos and such, if those icons were different from sin to skin it will be more of a support issue. I'm not closed to the idea of making these skinnable at some point as my general philosphy is to make things configurable enough so that people who disagree with my reasoning can do their own thing. Still it would take some work to go through and make these skinnable in a way that doesn't break existing skins. At the moment its not a priority for me though if someone wanted to sponsor that work it could become a priority. Now I will say that if you come up with more intuitive icons that still meet the low impact criteria and you want to contribute those icons to the project I will consider them. I am rather graphically challenged myself and not able to produce any nice icons so I've used what is available. I will say that no matter how intuitive the icons may seem its easy to learn what they do and once the user knows about those it becomes second nature. The code that adds the admin menu link and the new page link is in mojoBasePage, the code that adds the page settings link is in Default.aspx.cs

Hope it helps,

Joe

6/12/2008 8:38:58 AM
Gravatar
Total Posts 11

Re: 2 level menus, Edit admin controls

Hi,
First of all thank you for your fast, accurate and lenghty reply. I will give the menu some though about how I want to do it, I will see when the project goes further on.

About the graphics it is not that I think the icons should be skinnable (because I don't belive they should, due to the reasons you specified). My feeling was that the same graphics were used in different context, but researching it further it might be a language issue (I'm using swedish translation). My appologize.

About the icons, I would go for free LGPLed onces. There are several out there which are very good looking, and makes the CMS seem more up to date.

My next challenge is to change the looks on the Shared files menu, wish me luck :-)

Regards,
Niklas

6/16/2008 2:49:57 AM
Gravatar
Total Posts 11

Re: 2 level menus, Edit admin controls

This would probably work to hide everything below level 2:

      if (topLevelOnly)
            {
                menu1.MaximumDynamicDisplayLevels = 0;
            }
            else
            {
                menu1.MaximumDynamicDisplayLevels = 2;
            }

In SiteManu.ascx.cs

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