ASPX templates
Version 6.x > ASPX templates > CMSListMenu as a Tabmenu View modes: 
User avatar
Member
Member
maassenbas-hotmail - 11/18/2011 9:43:32 AM
   
CMSListMenu as a Tabmenu
Hi guys,

I want to make a tab menu on my website. Now I used a CMSListMenu with a horizontal layout. These tabs must only be displayed when you open the parent. This can be done with 'Path="./%"'.
But now when I click on a item of this tabmenu, the tabmenu is gone.

This can be solved with 'Path="../%"', but then the tabs are also shown on other pages.

Example:
This is my structure from my website.

- Home (Level 1)
- Tabpage 1 (Level 2)
- Tabpage 2 (Level 2)
- About (Level 1)
- Tabpage 3 (Level 2)

When you are on the Home page, only Tabpage 1 and Tabpage 2 must be displayed.
Then if you click on Tabpage 1, Tabpage 1 and Tabpage 2 must still be displayed.
If you click on Tabpage 2, Tabpage 1 and Tabpage 2 must still be displayed.

When you are on the about page, only Tabpage 3 must be displayed.
If you click on Tabpage 3, Tabpage 3 must still be displayed.

Does somebody know how I can solve this problem?

Thanks in advance,

Bas Maassen

User avatar
Kentico Support
Kentico Support
kentico_janh - 11/21/2011 2:13:25 AM
   
RE:CMSListMenu as a Tabmenu
Hi Bas,

You can use directly the Tab Menu webpart or you can stay with the CMSListMenu webpart, because the approach and settings are the same for both of these webparts, so please follow the steps below:

1) fill the Path property with /{0}/% ({0} substitutes current document path on a first level)
2) set Document types to CMS.MenuItem (if you are using menu item document types)
3) apply this template for all of the documents you want to have in your tab menu

Best regards,
Jan Hermann

User avatar
Member
Member
maassenbas-hotmail - 11/24/2011 3:02:20 AM
   
RE:CMSListMenu as a Tabmenu
Hi Jan,

That's not exactly what i'm looking for. The tabpages can be on different levels. When I open a page, the tabpages under the current page must be displayed. Also I used custom doctypes for tabpages, so I used ClassNames="AM.TabItem" in the CMSListMenu.

Example:

- Home (Level 1)
- Tabpage1 (Level 2) <-- Custom Doctype AM.TabItem
- Tabpage2 (Level 2) <-- Custom Doctype AM.TabItem
- Contact (Level 2)
- Tabpage3 (Level3) <-- Custom Doctype AM.TabItem
- Tabpage4 (Level 3) <-- Custom Doctype AM.TabItem
- About (Level 3)
- Tabpage5 (Level 4) <-- Custom Doctype AM.TabItem

When you are on Home page, only Tabpage1 and Tabpage 2 must be displayed.
When you are on Contact page, only Tabpage3 and Tabpage4 must be displayed.
When you are on About page, only Tabpage5 must be displayed.

I can use 'Path="./%"'. Now only the tabpages are displayed under the current parentnode.
The problem is when I click on a tabpage, I will go a level down. This means that the tabpages will disappear. Is there a way to solve this problem?

Best regards,

Bas Maassen

User avatar
Kentico Support
Kentico Support
kentico_janh - 11/24/2011 3:43:10 AM
   
RE:CMSListMenu as a Tabmenu
Hello Bas,

As I mentioned, you need to fill the Path property with a /{0}/% value, not with a ./% one in your webpart. If the tabpages disappear, when you go to some sublevel, it means, that your subpages (tabpages) doesn't contain this webpart, so please add the same webpart also into all subpages or use the same template for them.

Best regards,
Jan Hermann