ASPX templates
Version 7.x > ASPX templates > Aspx + Portal page widget inheritance, hard-coded menu links View modes: 
User avatar
Member
Member
btagis - 3/25/2013 8:31:36 AM
   
Aspx + Portal page widget inheritance, hard-coded menu links
Hello all,

Beware of absolute beginner question; I'm sure I'm missing something conceptual here. I'm using aspx + portal engine, and need to hard-wire a menu, with links that point to CMS pages, at the masterpage level. The menu web part isn't really appropriate.

I've put a webpartzone in the masterpage, & added in the links I need. They aren't consistently applied across various other Template Pages. Now I understand entirely why this would be happening -- placing the webpartzone in the masterpage is just shorthand for placing it separately on each page, and the pages' zone contents are maintained independently. What I don't understand is how to achieve my aim!

Is there some way of inserting a webpart into the masterpage code which will translate into a cms page link? I could hard-code absolute links, but they won't work in deployment...

Thanks!

User avatar
Kentico Support
Kentico Support
kentico_filipl - 3/25/2013 9:28:10 AM
   
RE:Aspx + Portal page widget inheritance, hard-coded menu links
Hello,

Why is the menu web part not suitable for you? It is designed exactly for this purpose.

There are many types of menu web parts, i.e. CSS list menu, Drop-down menu, Tree menu. You can see the example on a sample Corporate Site after you select the root of the site -> Design Top list menu (in Menu zone). The important thing is that the menu web part is correctly configured. It means that Path property must be set to /% (for all pages in the menu) and Document types to CMS.MenuItem to make the complete first level menu.

There are a lot of other options which can be set for the menu web part to fit your needs.

There is also another way of creating a menu if you really cannot use menu web parts for some reason but I would not recommend it. You can put Static text web part on the Master page and set Text property as links to certain pages through <a href> tags.

Best regards,
Filip Ligac