Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Hide container if editable text is empty View modes: 
User avatar
Member
Member
epogburn-nola - 6/27/2012 3:55:15 PM
   
Hide container if editable text is empty
I have an editable text web part that has a container div. However, it is only used for special occasions. When it isn't used, the content is blank, however the container div is still there.

Is it possible to hide the container (or entire web part) if the content is empty?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/27/2012 4:27:48 PM
   
RE:Hide container if editable text is empty
Hi,

You will need to create a custom macro. This macro will check whether the region is empty or not and return true/false. The macro can be then used in the visibility setting for given web part.

Best regards,
Juraj Ondrus

User avatar
Certified Marketer 13
Certified Marketer 13
james-distinctionhq - 10/12/2012 9:53:23 AM
   
RE:Hide container if editable text is empty
Hi Juraj,

Can you expand on this a little?

Where should the custom macro be placed after it's created?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/14/2012 1:00:05 AM
   
RE:Hide container if editable text is empty
Hi James,

Sorry for not being clear.

When you open the configuration of given web part, there is a property called "Visible" and click on the black arrow next to it - then a macro builder window is opened and you can compose or paste the macro here (documentation link - "Edit value dialog in web part properties" paragpah).

Best regards,
Juraj Ondrus