Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Show webpart for all doc types - except one View modes: 
User avatar
Member
Member
Boolean - 7/24/2013 5:03:16 PM
   
Show webpart for all doc types - except one
Hi all

This might be a simple question. I have a webpart that I want to show on all document types across the site...except one :)

At the moment the only way I can seem to do this is in 'show for document types' select all except for the one I want to exclude. This becomes dangerous though as we add new document types to the system they are not automatically included.

Is there a way to do this?

User avatar
Certified Developer 13
Certified Developer 13
kentico-jx2tech - 7/24/2013 6:49:05 PM
   
RE:Show webpart for all doc types - except one
in the Visible property try...
{% !(CurrentDocument.NodeClass.CodeName == "<DOCUMENT_TYPE_CODE_NAME>") %}
Replacing <DOCUMENT_TYPE_CODE_NAME> with the code name of the doc type that you want to exclude.

User avatar
Member
Member
Boolean - 7/25/2013 8:04:17 AM
   
RE:Show webpart for all doc types - except one
OH! Of course. I was trying to put this into the 'show for doctypes' macro and couldn't figure out how to show/hide it when it's expecting a class name. Of course, the visible setting!

Thanks! :)