Skip to content

Commit

Permalink
Add default values to variables and check if set before including add…
Browse files Browse the repository at this point in the history
…itional templates
  • Loading branch information
hknezevic committed Sep 25, 2024
1 parent 7176996 commit 7abf8b0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bundle/Resources/views/themes/ngadmin/content/tab/urls.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{% trans_default_domain 'ibexa_content_url' %}

{% include '@ibexadesign/content/tab/url/siteaccess_urls_table.html.twig' with {
headline:'tab.urls.siteaccess.headline.siteaccess_urls'|trans|desc
('Siteaccess URLs'),
siteaccess_urls: siteaccess_urls,
} only %}
{% if siteaccess_urls|default([]) is not empty %}
{% include '@ibexadesign/content/tab/url/siteaccess_urls_table.html.twig' with {
headline:'tab.urls.siteaccess.headline.siteaccess_urls'|trans|desc
('Siteaccess URLs'),
siteaccess_urls: siteaccess_urls,
} only %}
{% endif %}

{% if show_siteaccess_urls_outside_configured_content_tree_root %}
{% if show_siteaccess_urls_outside_configured_content_tree_root|default(false) == true
and siteaccess_urls_outside_configured_content_tree_root|default([]) is not empty
%}
{% include '@ibexadesign/content/tab/url/siteaccess_urls_table.html.twig' with {
headline:
'tab.urls.siteaccess.headline.siteaccess_urls.outside_configured_content_tree_root'|trans|desc
Expand Down

0 comments on commit 7abf8b0

Please sign in to comment.