Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Show web part on pages under specific folder/node View modes: 
User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 6/1/2012 11:29:57 AM
   
Show web part on pages under specific folder/node
Hello,

I use a template on several pages under several nodes. Is there a way to display a web part on this template only if the document is under a specific folder/node?

Thank you,
Dimitris

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/2/2012 10:26:48 AM
   
RE:Show web part on pages under specific folder/node
Hi,

You can use a macro expression in the Visibility field. This macro must return true/false. So, the macro could look like this:

{%CurrentDocument.DocumentNamePath == "<yourpath>"%}

instead of "equals" you can use also "notequals" or even K#

Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 6/5/2012 5:15:56 AM
   
RE:Show web part on pages under specific folder/node
I needed something like the following and it works like a charm!

{% cmscontext.currentdocumentparent.nodealiaspath != "/Test "%}

Thank you Juraj!

Dimitris