src/Cms/ContentBundle/Resources/views/Render/Widget.html.twig line 1

Open in your IDE?
  1. <div data-cms-widget="{{ _widget.__fqcn__ }}" {{ cms_widgetContainer(
  2.     (_widget.container is defined and _widget.container is not null) ? _widget.container : null,
  3.     _htmlId
  4. ) }}>
  5.     {% if _error is not null %}
  6.         <div data-cms-widget-error>{{ _handler.key }}:ERROR:{{ _error.message }}</div>
  7.     {% else %}
  8.         {% include _twig %}
  9.     {% endif %}
  10. </div>
  11. {% if _handler.styles|length > 0 or _handler.scripts|length > 0 or _handler.hasPlugin() %}
  12.     <script type="text/javascript">
  13.         Campussuite.Widgets.run({{ cms_widgetTrigger(
  14.             _handler,
  15.             _plugin,
  16.             _htmlId,
  17.             ((_styles is defined and _styles is iterable) ? _styles : []),
  18.             ((_scripts is defined and _scripts is iterable) ? _scripts : [])
  19.         ) }});
  20.     </script>
  21. {% endif %}