Home

Widgets

Check to see if a widget area has any widgets

If you want to check that a WidgetArea actually has widgets, and only display it if it has, you can add this function to your Page_Controller (where widgetBarID is the name of your widgetArea + ID):

Then in your template file, MyPage.ss you can use HasWidgets to check whether the WidgetArea should be rendered:

Read More >>