Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements. View modes: 
User avatar
Member
Member
Charley - 11/25/2009 3:41:22 PM
   
CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements.
I'm in the middle of migrating a site from 3.x to 4.1

The code below worked correctly in 3.x: the separator text appeared between each of the elements in the menu as expected.

Currently, in the 4.1 version of the site, the separator text appears between each of the elements in the menu as expected, but the separator text ALSO appears at the beginning of the menu.

I've used the same sort of code in multipe sites in 3.x and 4.0 and have not run into this problem before.


<cms:CMSMenu ID="CMSMenu2"
Layout="Horizontal"
Path="/DRI/Page-Footer/%"
SelectOnlyPublished="true"
runat="server"
OrderBy="NodeOrder"
ClassNames="CMS.MenuItem;CMS.File;dts.pageoverview;dts.link"
SeparatorText=" | "
CssClass="inlineTable"
CSSPrefix="Footer;FooterSub;FooterSubSub" />

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 11/26/2009 11:35:11 AM
   
RE:CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements.
Hi,

Could you please try to use web part instead of control?

<%@ Register Src="~/CMSWebParts/Navigation/cmsmenu.ascx" TagName="CMSMenu" TagPrefix="uc1" %>

I hope this will help you.

Best regards,
Miroslav Remias.

User avatar
Member
Member
Charley - 11/30/2009 7:28:14 AM
   
RE:CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements.
the webpart has the same problem (with the added issue that the web part adds a div so it messes with the page layout.

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 11/30/2009 9:52:57 AM
   
RE:CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements.
Hi,

After further investigation on this issue we have found that you are breaking content tree structure with your OrderBy condition. Please use for example following OrderBy condition:

OrderBy="NodeLevel, NodeOrder"

I hope this will help you.

Best regards,
Miroslav Remias.

User avatar
Member
Member
Charley - 11/30/2009 2:22:01 PM
   
RE:CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements.
That does fix the problem, as does setting the maxrelativelevel to 1.

This seems kind of an odd behavior though: none of the child elements appear as part of that menu, since none of the immediate child elements are of the right class.

Since I'm likely to be migrating some other sites from 3.x to 4.1, I'm curious to whether there any other controls that might have undergone a similar change (ie: they are now dependent on the tree being preserved).

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 12/2/2009 8:44:52 AM
   
RE:CMSMenu: The Seperator text is appearing at the beginning of the menu, before any other elements.
Hi,

Should you find any similar issue, please post your findings and we will be happy to help you.

Best regards,
Miroslav Remias.