Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > CMSListMenu - RenderItemID View modes: 
User avatar
Member
Member
Bev - 5/2/2012 5:38:19 AM
   
CMSListMenu - RenderItemID
Hello,

I'm having a slight issue with creating a menu. I'm using the CMSListMenu webpart, and want to display a unique ID for each menu item.

Reading through, I saw that by checking RenderItemID it would provide each menu item with a unique ID. So I checked the checkbox and reloaded my page. It has provided each menu item with an ID but they are not unique, each menu item has the exact same ID.

I really need each menu item to have a unique ID, and wondered if there was another way of doing this, or if there was a bug with RenderItemID??

I'm using Kentico version 6.0.4308.

Thanks in advance for any help.

Bev

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/2/2012 6:52:45 AM
   
RE:CMSListMenu - RenderItemID
Hi,

could you please apply the latest hotfix? After I checked the property Render item ID I could see elements with unique ID, for example:

<li id="tm_LI_0_5_1181" class="CMSListMenuLI">

I am not aware of any bug, but it may be fixed with something else.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
Bev - 5/4/2012 3:50:43 AM
   
RE:CMSListMenu - RenderItemID
Heya,

Well we applied the latest hotfix (29) but it is still not giving each menu item a unique ID. It is basically outputting the following code:

<ul class="CMSListMenuUL" id="menuElem">
<li class="CMSListMenuLI" id="menuElem_LI_0_1_326"><a href="/Services" class="CMSListMenuLink">Services</a><div class="hovernav"> </div></li>
<li class="CMSListMenuHighlightedLI" id="menuElem_LI_0_1_326"><a href="/Our-Work" class="CMSListMenuLinkHighlighted">Our Work</a><div class="hovernav"> </div></li>
<li class="CMSListMenuLI" id="menuElem_LI_0_1_326"><a href="/About-Us" class="CMSListMenuLink">About Us</a><div class="hovernav"> </div></li>
</ul>

And as you can see each menu item has the same ID. I basically need a unique ID for each menu item, so that I can then displaying the hovernav div for that menu item. The hovernav div contains an image which needs to be displayed when you hover over the menu item. The reason why I have popped it in a div is that it has to appear quite a bit below the menu item - rather than behind the menu item itself.

If anyone has any other suggestions as to how I could achieve this, I would appreciate it.

Thanks,

Bev

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/10/2012 2:46:47 AM
   
RE:CMSListMenu - RenderItemID
Hi,

that is strange. Just to be sure - by CMSListMenu do you mean CSS List Menu web part?
Could you please compare your properties with mine?

Webpart properties (CSS list menu)
Alias path: /
Zone ID: zM
Default
Web part control ID: wM
Web part title: Top list menu
Disable view state: False
Disable macros: False
Visibility
Visible: True
Hide on subpages: False
Show for document types:
Display to roles:
Content
Path: /%
Highlighted document path:
Content filter
Document types: CMS.MenuItem
Combine with default culture:
Culture code:
Maximum nesting level: 2
ORDER BY expression:
Select only published: True
Site name:
WHERE condition: MenuItemGroup <> 'footer' OR MenuItemGroup IS NULL
Columns:
Filter name:
Design
CSS prefix:
Display highlighted item as link: True
Display only selected path: False
First item CSS class:
Highlight all items in path: True
LI hover CSS class name:
Last item CSS class:
OnMouseOut script:
OnMouseOver script:
Render CSS classes: True
Render item ID: True
Render link title: False
Render image alt: True
Item ID prefix: tm
Sub-menu indicator image:
Target frame:
Use alternating styles: False
Use item images for highlighted items: False
Apply menu design: True
Word wrap: True
Encode menu caption: True
No data behavior
Hide if no record found: False
No record found text: There are no menu pages.
System settings
Check permissions: False
Cache item name:
Cache minutes:
Cache dependencies: ##DEFAULT##
Web part container
Web part container:
Container title:
Container CSS class:
Container custom content:
Hide container on subpages: False
HTML Envelope
Content before:
Content after:
AJAX
Use update panel: False
Time zones
Time zone: inherit
Custom time zone:
Partial caching
Partial cache minutes:
Partial cache dependencies: ##DEFAULT##



With above configuration was IDs unique. (Tested on a default Corporate site).

Best regards,
Ivana Tomanickova

User avatar
Member
Member
Bev - 5/14/2012 9:17:42 AM
   
RE:CMSListMenu - RenderItemID
Afternoon,

Yup it is the CMS List Menu web part that I am using. I've compared my properties with yours, and other than the fact I'm not applying a WHERE clause they are identical.

My properties are:
Webpart properties (CSS list menu)
Alias path: /
Zone ID: zoneHeader
Default
Web part control ID: cmslistmenu
Web part title: Main Menu
Disable view state: False
Disable macros: False
Visibility
Visible: True
Hide on subpages: False
Show for document types:
Display to roles:
Content
Path: /%
Highlighted document path:
Content filter
Document types: CMS.MenuItem
Combine with default culture:
Culture code:
Maximum nesting level: 2
ORDER BY expression:
Select only published: True
Site name:
WHERE condition:
Columns:
Filter name:
Design
CSS prefix:
Display highlighted item as link: True
Display only selected path: False
First item CSS class:
Highlight all items in path: True
LI hover CSS class name:
Last item CSS class:
OnMouseOut script:
OnMouseOver script:
Render CSS classes: True
Render item ID: True
Render link title: False
Render image alt: True
Item ID prefix: menu
Sub-menu indicator image:
Target frame:
Use alternating styles: False
Use item images for highlighted items: False
Apply menu design: True
Word wrap: True
Encode menu caption: True
No data behavior
Hide if no record found: False
No record found text: There are no menu pages.
System settings
Check permissions: False
Cache item name:
Cache minutes:
Cache dependencies: ##DEFAULT##
Web part container
Web part container:
Container title:
Container CSS class:
Container custom content:
Hide container on subpages: False
HTML Envelope
Content before: <div class="navbar">
Content after: </div>
AJAX
Use update panel: False
Time zones
Time zone: inherit
Custom time zone:
Partial caching
Partial cache minutes:
Partial cache dependencies: ##DEFAULT##


And I'm still not getting unique ID's!!

The site is a new one that has been created, but it isn't based on the default corporate site. So can only think that there is maybe something wrong with the set-up of this site??

Thanks for all your help,

Bev

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/15/2012 5:30:14 AM
   
RE:CMSListMenu - RenderItemID
Hi,

what is the build number of your CMS.Controls.dll file? The issue should not be related to the site, but maybe it would be the best if you could send me the export of your site to support@kentico.com. Please add a reference to this thread. Then I can try to reproduce described behavior.

Thank you.
Ivana Tomanickova