How can I clear all CSS classes from sitemenu object in layout.master

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.
3/3/2011 3:47:42 PM
Gravatar
Total Posts 18439

Re: How can I clear all CSS classes from sitemenu object in layout.master

I actually have an idea for this to make it possible to control the css classes used in the menu and treeview by settings in theme.skin file, and if needed I could add a property to enable turning off css altogether.

I'll post again after I get a chance to experiment with my idea.

Best,

Joe

3/4/2011 2:04:05 AM
Gravatar
Total Posts 11

Re: How can I clear all CSS classes from sitemenu object in layout.master

Thanks Joe

If you add this property for all objects that are used in layout.config it will be very good.

This property is useful in skinning issues.

Thanks a lot for your kind attention

With this administrator, MOJO will be the best portal soon :)

We are waiting for your news my friend

Have a nice time & sorry for my bad English

 

Mehrdad

3/5/2011 5:51:57 AM
Gravatar
Total Posts 11

Re: How can I clear all CSS classes from sitemenu object in layout.master

Nobody has a new idea?

3/5/2011 6:37:00 AM
Gravatar
Total Posts 18439

Re: How can I clear all CSS classes from sitemenu object in layout.master

Let me give you some advice.

  1. be patient no-one here is your employee and no-one here is under any obligation or pressure to answer at all, I said I would reply again after I get a chance to work on it, don't try to pressure me for faster responses, doing that makes me not want to help
  2. maybe this is a cultural difference but in my culture when you call people who you don't know "friend" and you are trying to persuade or pressure  them to do something it makes you sound like a pushy salesman, it does not make people feel like a friend at all. 

I worked most of the day yesterday on making menu properties configurable from the theme.skin file so it is possible to control many aspects of the rendering including the CSS classes used and the ability to turn off all CSS. If you are working from the source code repository these changes are already in there, otherwise these changes will be available in the next release of mojoPortal.

This shows how to declare it in theme.skin and shows alll the default values for menu:

<portal:mojoMenu runat="server" SkinID="SiteMenu"
  RenderContainerCssClass="true"
  RenderCssClasses="true"
  RenderAnchorSelectedCss="true"
  RenderLiSelectedCss="true"
  RenderImages="true"
  UlCssClass="AspNet-Menu"
  LiCssClassWithChildren="AspNet-Menu-WithChildren"
  LiCssClassWithoutChildren="AspNet-Menu-Leaf"
  LiSelectedCssClassWithChildren="AspNet-Menu-SelectedWithChildren"
  LiSelectedCssClassWithoutChildren="AspNet-Menu-SelectedLeaf"
  LiChildSelectedCssClass="AspNet-Menu-ChildSelected"
  LiParentSelectedCssClass="AspNet-Menu-ParentSelected"
  AnchorCssClass="AspNet-Menu"
  AnchorSelectedCssClassWithChildren="AspNet-Menu-SelectedWithChildren"
  AnchorSelectedCssClassWithoutChildren="AspNet-Menu-SelectedLeaf"
  AnchorChildSelectedCssClass="AspNet-Menu-ChildSelected"
  AnchorParentSelectedCssClass="AspNet-Menu-ParentSelected"
/>

this example shows how to turn off all CSS on the menu:

<portal:mojoMenu runat="server" SkinID="SiteMenu"
  RenderContainerCssClass="false"
  RenderCssClasses="false"
  RenderAnchorSelectedCss="false"
  RenderLiSelectedCss="false"
 
/>

Note however that the Menu control inherits from the ASP.NET Menu control and that control has javascript that adds CSS to the menu and there is no way to disable that javascript. To really get no CSS you could use a TreeView. This shows the settings I implemented to control mojoTreeView rendering with default values:

<portal:mojoTreeView runat="server" SkinID="SiteMenu"
  RenderLiCssClasses="true"
  RenderAnchorCss="false"
  ExpandedCssClass="AspNet-TreeView-Collapse"
  CollapsedCssClass="AspNet-TreeView-Expand"
  LiCssClass="AspNet-TreeView-Leaf"
  LiRootExpandableCssClass="AspNet-TreeView-Root"
  LiRootNonExpandableCssClass="AspNet-TreeView-Root AspNet-TreeView-Leaf"
  LiNonRootExpnadableCssClass="AspNet-TreeView-Parent"
  LiSelectedCssClass="AspNet-TreeView-Selected"
  LiChildSelectedCssClass="AspNet-TreeView-ChildSelected"
  LiParentSelectedCssClass="AspNet-TreeView-ParentSelected"
  AnchorCssClass="inactive"
  AnchorSelectedCssClass="current"
 
/>

and this shows how you can turn off all CSS:

<portal:mojoTreeView runat="server" SkinID="SiteMenu"
  RenderLiCssClasses="false"
  RenderAnchorCss="false"
/>

In both examples to make it affect PageMenu then set the SkinID="PageMenu" instead of "SiteMenu" or create entries for both in theme.skin

So there you have it, if working from the source code is is possible to make a menu or treeview with no CSS or with custom CSS classes. And these changes will be available in the next release of mojoPortal.

 

3/5/2011 7:51:37 AM
Gravatar
Total Posts 11

Re: How can I clear all CSS classes from sitemenu object in layout.master

Dear Joe

You are right :)

Actually I didn't want to disturb you and the other members :)

This happened as a result of differences in our cultures.

I do apologize from you and all members for this misunderstanding.

Thanks a lot for your guidance :) I will try your recommended solution as soon as possible :)

I have not started working on source code repository but I will do it.

Finally I want to say, All the things that I mentioned are only idea, They are not command :). I am really interested to work on Mojo and I am trying to design nice skins for this portal.

BUT

You are the administrator and there is no doubt that you (& your team) exactly are more experienced and skillful rather than a beginner like me.

Thanks a lot for your attention and Excuse me again.

Best wishes

Mehrdad

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