Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Hiding transformation hierarchial item View modes: 
User avatar
Member
Member
paul.truman-sunmed.co - 11/16/2012 9:03:45 AM
   
Hiding transformation hierarchial item
Hey, I have a directory structure of product > Directory > Testimonial

I'm using a hierarchial transformation to display a list of products, with relevant testimonial underneath that product all on one screen. What I would like to do is not show any product items that do not have any testimonials under them. Is this possible using this webpart?

User avatar
Kentico Support
Kentico Support
kentico_janh - 11/19/2012 8:34:23 AM
   
RE:Hiding transformation hierarchial item
Hello,

You can take advantage of the Text/XML transformation types, where you can use context macros, so you can add similar statement to it:

{%Documents[CurrentDocument.NodeAliasPath+"/Directory"].Children.Count%}


This return a number of children of the Directory subfolder of current document/product and if this value is greater than 0, then you can show the item.

Otherwise (with the ASCX transformation), you would need to write your own transformation function or resolve macros by using API.

Best regards,
Jan Hermann