Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > WHere to put Left Navigation Web Part View modes: 
User avatar
Member
Member
Also-Media - 11/15/2009 2:42:10 AM
   
WHere to put Left Navigation Web Part
Hi,

I am building a new site using Portal engine and need some help with where to put my left menu web part.

All pages will have a top and a left menu except the home page. It will only have a top menu. I have been experimenting and it seems I have a few options but I can't help but think I must be missing something:

1. Don't put the left menu in the master page. Then include it on ALL subsequent page templates. But I'll have a lot of different templates so if I change the left menu in future then there is a lot of redundancy.

2. Put the left menu on the master page so all pages that inherit content will use it. But don't inherit any content on the Home page and so have the home page as a totally separate template. This means I have to maintain 2 instances of my header, footer, top nav etc.

3. Include the left menu on all pages, but hide it using CSS on the home page. I don't think this is right.

I looked at the commercial site example and it seems to use option 1. But this will mean I have to update many templates if I want to change my left navigation.

Any help appreciated
Thanks

User avatar
Member
Member
whitney_jason - 11/15/2009 10:21:44 AM
   
RE:WHere to put Left Navigation Web Part
Hi,

I had a similar issue. I was able to resolve it by using a macro to set the visibility atribute of the menu web part that I didn't want to shown on my home page. I left the menu in my master page and set the visbilty with the code below. Check out the Macro Paramiters section of the Developer Guide, it's very useful. http://devnet.kentico.com/docs/devguide/appendix_a___macro_expressions.htm

I hope this helps,

Jason

here's my code:
{%cmscontext.currentdocument.documentname != "Home"%}



User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/27/2009 6:14:19 AM
   
RE:WHere to put Left Navigation Web Part
Hello.

I think Jason´s approach is very good for this purpose. You can set visibility of any web part in Web part properties -> Visibility -> Visible -> edit value (little black triangle). Here, you can use a macro expression and also set visibility of any web part (true/false) in dependance on document name, alias path, etc. I would also recommend you to read through link to Developer´s guide, as Jason mentioned, where you can find more details.

Best Regards,
Radek Macalik
Support Engineer