{% set widgetname="item" %} {% extends 'Pagewidget/widget.twig' %} {% block widgetaction %} {% if canadd %} {% endif %} {% endblock %} {% block widgetbody %}
{% 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 %} {% for item in items %}
{% 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 }}
{% endfor %}
{% endblock %}