Search code examples
kentico

Add widget on page template


I have a page template and multiple pages using that template. This page template has a widget zone on it. I want to place a widget into this zone which will display on each page. Is there a way to add this default widget on page template so that I don't have to add it one by one on each page.


Solution

  • Yes, if you add the widget on the Design tab of the template (rather than adding it via the page tab) the widget will show up by default on any NEW pages that are created using that template (pages that already exist with that use that template will not receive the widget automatically).

    From there, when a new page is created using that template, the widget, along with its settings, will be on the page by default. The content author can then modify or delete this widget as normal.

    Depending on the version of Kentico you are using, you can reset widgets within a zone back to the default widget content by following the directions here. Which would allow you to reset widget content on a page that's already created, but will not allow you to inject a widget into a page without removing the widgets that have been added to the widget zone via the page tab.