{% set widgetname="item" %} {% extends 'Pagewidget/widget.twig' %} {% block widgetaction %} {% if canadd %} {% endif %} {% endblock %} {% block widgetbody %} {% set havemenu=false %} {% set havebookmark=false %} {% if menu and withbookmark!= 2 and (canadd or bookmarks is not empty or itemcategorys|length > 1) %} {% set havemenu=true %}
{% if menuall %}
Tout
{% endif %} {% if bookmarks is not empty or canadd %}
{% endif %} {% for itemcategory in itemcategorys %}
{{itemcategory.label}}
{% endfor %}
{% endif %} {% if search %} {% set havemenu=true %}
 
{% endif %} {% if (bookmarks is not empty or canadd ) and (withbookmark==0 or withbookmark==2) %} {% if withbookmark==0 or itemcategorys|length > 1 %}

Favoris

{% endif %}
{% for bookmark in bookmarks %} {% set havebookmark=true %} {% if bookmark.item %} {% set bookmarktitle = bookmark.item.title %} {% set bookmarksubtitle = bookmark.item.subtitle %} {% set bookmarkbackgroundcolor = bookmark.item.color ? bookmark.item.color : app.session.get('colorbgbodydark')|raw %} {% set bookmarktarget = bookmark.item.target %} {% set bookmarkurl = ( bookmark.item.protected and not app.user ? path("app_login") : bookmark.item.url|replace({'#login#': username}) ) %} {% set bookmarkcontent = bookmark.item.content %} {% set bookmarkicon = (bookmark.item.icon ? bookmark.item.icon.label : "icon/icon_pin.png") %} {% else %} {% set bookmarktitle = bookmark.title %} {% set bookmarksubtitle = bookmark.subtitle %} {% set bookmarkbackgroundcolor = bookmark.color ? bookmark.color : app.session.get('colorbgbodydark')|raw %} {% set bookmarktarget = bookmark.target %} {% set bookmarkurl = bookmark.url|replace({'#login#': username}) %} {% set bookmarkcontent = null %} {% set bookmarkicon = bookmark.icon ? bookmark.icon.label : "icon/icon_pin.png" %} {% endif %}
{% if bookmarktarget == 'frame' %} {% else %} {% endif %}

{{ bookmarktitle }}

{{ bookmarksubtitle|nl2br }}
{% if canadd %} {% if bookmark.item %} {% else %} {% endif %} {% endif %} {% if bookmarkcontent %} {% endif %}
{{ bookmarkcontent|raw }}
{% endfor %} {% if (canadd) %}
{% endif %}
{% endif %} {% for itemcategory in itemcategorys %} {% if itemcategorys|length > 1 or havebookmark or canadd %}

{{itemcategory.label}}

{% endif %}
{% for item in items %} {% if item.itemcategory==itemcategory %}
{% set url=item.url|replace({'#login#': username}) %} {% if item.protected and not app.user %} {% set url=path('app_login') %} {% endif %} {% if item.target == 'frame' %} {% else %} {% endif %} {% if item.icon %} {% else %} {% endif %}

{{ item.title }}

{{ item.subtitle|nl2br }}
{% if canadd %} {% endif %} {% if item.content %} {% endif %}
{{ item.content|raw }}
{% endif %} {% endfor %}
{% endfor %} {% endblock %}