Site structure
Version 7.x > Site structure > Conditional statement in Web part container View modes: 
User avatar
Member
Member
alan - 2/6/2014 11:52:47 AM
   
Conditional statement in Web part container
Hi

I am wondering if I can detect culture in a web part container.

Thanks

User avatar
Member
Member
kentico_sandroj - 2/6/2014 2:12:39 PM
   
RE:Conditional statement in Web part container
Hello,

Yes it is possible to check the culture inside of a Web part container. This works for the current document culture:

{%CurrentDocument.DocumentCulture%}

Would using the macros work for you?

Please let me know if you have any questions.

Best Regards,
Sandro

User avatar
Member
Member
alan - 2/6/2014 9:10:44 PM
   
RE:Conditional statement in Web part container
Thanks that works for me! I ended up using the culture macro.
By the way I have another question.

Say I have a set of pages that are using the same page template. How can I specify a certain page that does not use one of the web part from the page template?

Thanks!

User avatar
Member
Member
kentico_davidb2 - 2/7/2014 2:55:25 AM
   
RE:Conditional statement in Web part container
You can edit the webpart's Visibility -> Visible property by clicking on the small arrow next to it and use macro similar to:
{% NodeAliasPath != "/Company/About-Us" %}

This will return true for all pages but the one with specified NodeAliasPath, therefore will be visible on all but the one.

Dave