Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Webpart Visibility for select multiple pages View modes: 
User avatar
Member
Member
jamxi - 3/11/2013 10:27:06 AM
   
Webpart Visibility for select multiple pages
Can someone provide a K# example on how I might accomplish setting up a webpart to only appear on certain pages. I can't quite figure it out the correct k# statement in the visiblity setting of the webpart

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/12/2013 7:55:23 AM
   
RE:Webpart Visibility for select multiple pages
In the visibility section of the webpart you can check the URL for specific text like I've done below
{% if (Document.AbsoluteURL.Contains("Club")) { true }else{ false } %}

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/13/2013 10:10:54 AM
   
RE:Webpart Visibility for select multiple pages
Hi,

Another simple way is to use the DocumentID or DocumentName, e.g.:
{%CurrentDocument.DocumentID == 4%}

Best regards,
Martin Danko

User avatar
Certified Developer v7
Certified  Developer v7
mike.beck-navigators - 8/7/2013 1:37:08 PM
   
RE:Webpart Visibility for select multiple pages
How can I get the URL with the QueryString variables?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 8/7/2013 1:57:06 PM
   
RE:Webpart Visibility for select multiple pages
Hello Mike,

You can use the QueryString macro, combination of some macros with QueryString macro or create a Custom macro, depneding on what exactly do you want to achieve.

Best Regards,
Martin Danko