Archive
Monthly
Go
|
|
DNN Blog
Jun
9
Posted by:
Jon Henning
6/9/2006
In the past blog entry ClientAPI History, Goals, and Controls I stated,
“A few people asked me, the author of the Solution Partners Hierarchical Menu Control, why I would develop a competing menu control to my own. The answer is simple. The SolpartMenu is old and carries a lot of baggage with its almost 4 years worth of backwards compatibility. It has been a goal for v2 of the solpartmenu to abstract all of the common logic not specific to the menu into separate js files that could be reused by other controls and applications. This is exactly what the ClientAPI is; an abstraction of logic like positioning, DOM access, XML, etc. The script for the menu should contain only code for the menu, thus making it easier to maintain and enhance. So in essence, the DNNMenu is in a lot of ways the solpartmenu v2.0.”
I am pleased to announce that the first non-beta of the DNNMenu will be included in DNN 3.3/4.3. While its current implementation does not have all the features of the original Solpart Menu, it does include some new functionality that I have always wanted to add.
Keyboard Navigation The menu can now receives focus as the user tabs through the controls on the page. Once it has focus, you can use the arrow keys to navigate its structure. Pressing enter will invoke the menu item's clickaction.
Populate On Demand The DNNMenu will support POD in the same manner as the DNNTree control. This provide a nice performance boost for those of you concerned with page sizes. I even had time to make the module actions menu support POD. See chart below for comparisons between each option and other menus.
Mouse In Delay One of the features of the Solpart menu that was continually asked for was a mouse-in delay. This delay allows for people who are navigating to the sub-menus and accidentally move off the parent some grace period to get it right. The DNNMenu defaults this value to a quarter of a second (.25). I believe this is acceptable, however, for users used to the fast response times of other menus, it may look like the DNNMenu is a little sluggish. Note: At this time there is no way of configuring this property in the skin.
No Hardcoded Markup Probably the biggest regret I had in the original design of the Solpart menu was the hardcoding of certain tags in the code. This included the NOWRAP attribute added to the menu items, the use of spacer.gif and to obtain the correct spacing, and the worst of all, the hardcoding of the border around the menu items when hovering. None of this hardcoding is present in the DNNMenu. Note: the one exception is the spacer.gif that is used to do the iframe trick. I need a url to point the IFrame to in order to not get the security error when the site uses SSL.
Option to Remove All Use of Tables The menu supports a property that will completely remove its use of tables. Hopefully this will appease those developers and skinners who think that tableless designs are the way to go. I originally had the UseTables property default to False, but since it was too difficult to keep things lined up across browsers without adding some "hard-coding" to the css, I decided that I would default it to True and offer the most flexibility.
In one way or another you will have access to a skin that mimics the existing DNNBlue skin with the release of 3.3/4.3. There is some talk about switching the default DNNBlue skin with a new one, but nothing is finalized. Here is a checklist of things to note about writing skin objects for the DNNMenu.
Things to note (skin.xml)
Ø The nav skin object is used and only supports the organized properties (i.e. CSSNode, CSSControl, etc.) – See the DotNetNuke Navigation Controls.doc document for details
Ø ProviderName must be set to determine which control to use
Ø Different css classnames have been chosen for the menu to avoid conflicting settings in default.css, portals.css. This is mainly due to the workaround necessary for the Solpart borders. Note, that this does not prevent users from adding these classes to the default.css and portals.css to override things as necessary, just that we won’t default it for them. I believe this is a good thing, since it should lead to less support issues relating to non-skin specific css. We have only kept these settings in the past so we wouldn’t break backwards compatibility.
Ø By uncommenting the following settings in skin.xml your menu will support Populate On Demand
<!-- Enables Populate On Demand
<Setting>
<Name>PopulateNodesFromClient</Name>
<Value>True</Value>
</Setting>
<Setting>
<Name>ExpandDepth</Name>
<Value>1</Value>
</Setting>
-->
Things to note (skin.css)
Ø By default the menu uses tables to render all vertical menus. Any menu that is horizontal will not use tables. This means that if you use a horizontal menu, the root menu items only are tableless. All sub-menus use tables (they are vertical).
Ø Vertical menu items get their css assigned on the TR level. Therefore it may still be necessary to qualify your menu css with the td.
o .main_dnnmenu_item td { /*TD if menu option for using tables is on*/
Ø Word wrapping is now configured on or off via css
o white-space: nowrap; /*Word wrapping menu item now optional*/
Ø The spacing between menu items is no longer hardcoded to be a minimum space. Therefore it is necessary to add padding to some items to get a decent look. This is especially true of root menu items that are using a background image for their arrows that indicate children. If adequate padding is not added, the arrow will render on top of the text.
o padding: 0px 12px 0px 5px; /*explicitly set padding for root menu items*/
Things to note (other)
Ø Uplevel MacIE rendering will not be supported… at least for now.
Ø Populate On Demand on the module action level may cause issues with a module that dynamically adds their module actions in code. If you are using such a module it is recommended to simply use a container that does not have POD enabled. Please note, it is not the module developer's fault for writing their code this way.
Page Sizes and Populate On Demand In case you are wondering what the total page's payload is depending on the different menus used along with the different options to turn on POD, here is a list of the page trace “Render Size Bytes (including children)” values. The page used for all samples is the default DNN install page when logged in as host. The skin is the default DNN-Blue skin where the different ProviderNames are being applied. Please note, that this is simply to show the different output sizes for the exact same settings. In order to make each menu look good, some tweaks to the skin will be needed, potentially changing these numbers.
|
Render Size Bytes (Entire Page) |
Navigation Provider plus options |
|
241,769 |
ASP.NET 2.0 Menu * |
|
121,280 |
ASP.NET 2.0 Menu with CSS Control Adapter |
|
100,996 |
Solution Partner’s ASP.NET Menu |
|
99,149 |
DNNMenu Full – No Populate On Demand |
|
95,145 |
DNNMenu Populate On Demand on Main Menu |
|
83,918 |
DNNMenu Populate On Demand on Containers |
|
79,914 |
DNNMenu Populate On Demand Main and Containers | * I have spent no time trying to determine why the ASP.NET 2.0 Menu page output is so large and whether or not there is something that could be done to minimize its payload.
16 comment(s) so far...
Re: DNNMenu Release Announcement
Is it possible to have it before the release of DNN 3.3? Does it allow to have 2 different menu on the same page like housemenu by houseofnuke.com?
By simonech on
6/12/2006
|
Re: DNNMenu Release Announcement
Jon, Thanks so much for this work. When designing skins and working on the look and feel, the menu becomes one of the most, if not THE most discussed area as it's intricate role withint DotNetNuke and of course the expectations of others coming in to DotNetNuke who have no real understanding of how it works, often become so critical of the navigation, which I felt was unduly unfair since it's role has been unbelievably challenging to manage, as anything that's required to be "browser" and "OS" friendly opens up an enormous can of worms. And the work involved in the finer details simply eats away at hours, more than coins into a poker a machine!
And I just wanted to say thank you thank you thank you for listening to what people are asking for, being able to take what I feel has been alot of criticism over something I've always been a huge supporter of.
I am not sure if the general public is aware of how much time the developers put in here, into testing, trying, discussing, researching so many techniques and just how far we've come since the DotNetNuke 1 days.
I'm really looking forward to using this menu and have looked at it for some time now, waiting for those magic words... ready for release!
Let the fun begin!
Nina Meiers
By nina on
6/12/2006
|
Re: DNNMenu Release Announcement
Nice, nice! Hadn't heard of 4.3 yet. When will it be out! (joke)
Any comments on what browsers the no table version fails on and how bad it messes up? Thanks for writing up the super notes too!
By VashJuan on
6/12/2006
|
Re: DNNMenu Release Announcement
[Quote:] Mouse In Delay One of the features of the Solpart menu that was continually asked for was a mouse-in delay. This delay allows for people who are navigating to the sub-menus and accidentally move off the parent some grace period to get it right. The DNNMenu defaults this value to a quarter of a second (.25). I believe this is acceptable, however, for users used to the fast response times of other menus, it may look like the DNNMenu is a little sluggish. Note: At this time there is no way of configuring this property in the skin. [/Quote]
The ability for the user to select a larger mouse-in delay would be a definate Accessiblity enhancement/option for those who desire it.
By dagilleland on
6/12/2006
|
Re: DNNMenu Release Announcement
simonech. Multiple menus on a page is definitely possible. In fact, this is possible already with solpart. Whenever you go into edit of a page with a module you are seeing 2 menus. 1 for navigation and another for module actions.
VashJuan, 4.3 is really 4.1... there was some talk about syncing the sub-versions, not sure if it will happen though. Sorry for the confusion. Regarding the browser issues with no table. I think the main hurdle will be to add some very specific css styles to get this to work well. The menu can be demoed on http://webcontrols.dotnetnuke.com to get a preview. If you look at the source you see I change the css based off of the menu chosen (i.e. horizontal/veritical, tables/no-tables).
dagilleland, One of the things I am going to investigate in soon is the ability to specify navigation control specific settings in the nav skin object to account for these very specific properties. Though this would be a setting the skinner chooses, not the user... I will have to think about how the user could specify this, probably something similar to how the dnn skin allows the user to choose the font-size and page width...
All, Thanks for the comments!
By jhenning@solpart.com on
6/12/2006
|
Re: DNNMenu Release Announcement
Jon, with multiple menu I mean one displaying only the root menu, and another displaying all second level menu of the current menu tree (the peer level pages) Anyway, thank you for the answer
By simonech on
6/12/2006
|
Re: DNNMenu Release Announcement
Hi TrackBack !
Do you speak english ?
Ciao !
By johnt on
6/15/2006
|
Re: DNNMenu Release Announcement
how can I download the dotnetnuke.webcontrol projects I cant't see any downloadlink
By farsica on
7/10/2006
|
Re: DNNMenu Release Announcement
Hi, Sounds good. Is the new dnnmenu included in the current 4.3.1 release? If so, is there an example somewhere of using it in a skin with corresponding styles? Or any further guides? ed
By emcc on
7/10/2006
|
Re: DNNMenu Release Announcement
John
I'll thank you for your efforts... When I've setup my dnn-website 4.3 I'll try to implement this menu. I'm very happy that you've eleminated the 'hardcodes' like ... A simple question. Why you've maked the vertical menu with tables? I ask this question because there is always a gap of 1px between the rows.
Vriendelijke groeten Gilbert Vanden Borre
By gvborre on
7/10/2006
|
Re: DNNMenu Release Announcement
Thanks for the release. I finally found the doc info in the docs download (so much to read). I can't seem to find the switch for the table-less vertical menus though. IT also seems to be dumping a ton of whitespace tabs on the final XML= tag. I'll have to check Gemini for that. Works great in both FF and IE.
By wedwardbeck on
7/10/2006
|
Re: DNNMenu Release Announcement
farsica - the download is now available on the WebControl project download page.
emcc - yes. Sample skins will be provided shortly.
gvborre - I use tables for vertical menus in order to make sure all the arrows, text, and icons line up across all browsers. It is possible to accomplish this through some hard-coded css, but I wanted to stay away from hardcoding.
wedwardbeck - The tableless switch is not available in the default nav skin object, as it is very specific to this menu. I am still trying to determine what is the best way to allow access to menu specific properties through the provider model.
By jhenning@solpart.com on
7/10/2006
|
Re: DNNMenu Release Announcement
any news about sample skins? I really would like to try it in my dnn 4.3.3 site. Is there a documentation on how-to use it in skins?
Bye Luca
PS: jon, good job!
By cyberfester on
7/25/2006
|
Re: DNNMenu Release Announcement
Nina has posted 2 skins using the DNNMenu. Further documentation on the menu can be found in the DotNetNuke Navigation WebControls document (also included in the dotnetnuke documentation zip).
By jhenning@solpart.com on
7/25/2006
|
Re: DNNMenu Release Announcement
Can the menu be used as a module? Would like to have top and left nav on the same page, but would like to let users easily change the root page for the left nav for different sections of the site.
By aarenz on
8/8/2007
|
Re: DNNMenu Release Announcement
You could make a module encapsulating the menu. I also have provided a free menu module for solpart a while back (www.solpart.com), that you could use.
By jhenning@solpart.com on
8/8/2007
|
|