1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Handling empty widget containers

Handling empty widget containers

1 posts, 0 answered
  1. Nick
    Nick avatar
    18 posts
    Registered:
    19 Jul 2012
    23 May 2012
    Link to this post
    I'm currently working on a site where there is no guarantee that a widget container (i.e. asp:ContentPlaceholder) will have any widgets.

    I'm wondering if it's possible to only display a widget container if it contains widgets?

    Example:-

    <h2><asp:ContentPlaceHolder ID="heading" runat="server" /></h2>

    Assuming that no widgets are placed into the "heading" placeholder, how could I determine this so that I can hide the <h2> tags so that they do not appear?
1 posts, 0 answered