diff --git a/config/app/packages/templates.yaml b/config/app/packages/templates.yaml index b927740b6..a7b94c2bd 100644 --- a/config/app/packages/templates.yaml +++ b/config/app/packages/templates.yaml @@ -33,6 +33,7 @@ parameters: ngsite.default.template.errors.500: "@@ibexadesign/errors/500.html.twig" ngsite.default.template.errors.default: "@@ibexadesign/errors/default.html.twig" + ngsite.default.template.pagerfanta.ngsite: "@@ibexadesign/pagerfanta/ngsite.html.twig" ngsite.default.template.search: "@@ibexadesign/search/search.html.twig" ngsite.default.template.menu: '@@ibexadesign/menu.html.twig' diff --git a/templates/themes/app/pagelayout.html.twig b/templates/themes/app/pagelayout.html.twig index 2979d25aa..7c3b9991a 100644 --- a/templates/themes/app/pagelayout.html.twig +++ b/templates/themes/app/pagelayout.html.twig @@ -19,19 +19,19 @@ {% endblock %} {% block open_graph %} - {% include '@NetgenSite/parts/opengraph.html.twig' %} + {% include '@ibexadesign/parts/opengraph.html.twig' %} {% endblock %} {{ nglayouts_template_plugin('preview.javascripts') }} - {% include '@NetgenSite/parts/google_tag_manager_code_script.html.twig' %} + {% include '@ibexadesign/parts/google_tag_manager_code_script.html.twig' %} {% block structuredData %}{% endblock %} -{% include '@NetgenSite/parts/google_tag_manager_code_noscript.html.twig' %} -{% include '@NetgenSite/parts/facebook_api.html.twig' %} +{% include '@ibexadesign/parts/google_tag_manager_code_noscript.html.twig' %} +{% include '@ibexadesign/parts/facebook_api.html.twig' %}
{% block layout %} diff --git a/templates/themes/common/pagerfanta/ngsite.html.twig b/templates/themes/common/pagerfanta/ngsite.html.twig new file mode 100644 index 000000000..356c54cf3 --- /dev/null +++ b/templates/themes/common/pagerfanta/ngsite.html.twig @@ -0,0 +1,66 @@ +{% trans_default_domain 'ngsite' %} + + diff --git a/templates/themes/common/parts/content_fields.html.twig b/templates/themes/common/parts/content_fields.html.twig index 679329d19..8ad128889 100644 --- a/templates/themes/common/parts/content_fields.html.twig +++ b/templates/themes/common/parts/content_fields.html.twig @@ -56,7 +56,7 @@ {% set longitude = field.value.longitude|default(false) %} {% include - '@NetgenSite/parts/google_maps.html.twig' with { + '@ibexadesign/parts/google_maps.html.twig' with { 'container_id': field.id, 'latitude': latitude, 'longitude': longitude, diff --git a/templates/themes/common/parts/facebook_api.html.twig b/templates/themes/common/parts/facebook_api.html.twig new file mode 100644 index 000000000..1a0b7791f --- /dev/null +++ b/templates/themes/common/parts/facebook_api.html.twig @@ -0,0 +1,33 @@ +{% if ibexa.configResolver.hasParameter('site_settings.facebook_api', 'ngsite') + and ibexa.configResolver.hasParameter('facebook_app_id', 'netgen_open_graph') %} + {% set facebook_api = ibexa.configResolver.getParameter('site_settings.facebook_api', 'ngsite') %} + + {% if facebook_api %} + {% set facebook_app_id = ibexa.configResolver.getParameter('facebook_app_id', 'netgen_open_graph') %} + {% set facebook_locale = 'en_US' %} + {% if ibexa.configResolver.hasParameter('site_settings.facebook_locale', 'ngsite') %} + {% set facebook_locale = ibexa.configResolver.parameter('site_settings.facebook_locale', 'ngsite') %} + {% endif %} + + {% if facebook_app_id is not empty and facebook_locale is not empty %} + + {% endif %} + {% endif %} +{% endif %} diff --git a/templates/themes/common/parts/google_maps.html.twig b/templates/themes/common/parts/google_maps.html.twig new file mode 100644 index 000000000..e3b82d1e4 --- /dev/null +++ b/templates/themes/common/parts/google_maps.html.twig @@ -0,0 +1,25 @@ +{% include '@ibexadesign/parts/google_maps_init.html.twig' %} + +{% set container_id = container_id|default(0) %} +{% set latitude = latitude|default(ibexa.configResolver.parameter('google_maps.latitude', 'ngsite')) %} +{% set longitude = longitude|default(ibexa.configResolver.parameter('google_maps.longitude', 'ngsite')) %} +{% set zoom = zoom|default(ibexa.configResolver.parameter('google_maps.zoom', 'ngsite')) %} +{% set map_type = map_type|default(ibexa.configResolver.parameter('google_maps.map_type', 'ngsite')) %} + + + +
+
diff --git a/templates/themes/common/parts/google_maps_init.html.twig b/templates/themes/common/parts/google_maps_init.html.twig new file mode 100644 index 000000000..fe9e5b19c --- /dev/null +++ b/templates/themes/common/parts/google_maps_init.html.twig @@ -0,0 +1,25 @@ +{% if include_google_maps_script|default(false) %} + {% include '@ibexadesign/parts/google_maps_script.html.twig' %} +{% endif %} + + diff --git a/templates/themes/common/parts/google_maps_script.html.twig b/templates/themes/common/parts/google_maps_script.html.twig new file mode 100644 index 000000000..4375b525f --- /dev/null +++ b/templates/themes/common/parts/google_maps_script.html.twig @@ -0,0 +1,3 @@ +{% set google_maps_api_key = ibexa.configResolver.parameter('api_keys.google_maps')|default('') %} + + diff --git a/templates/themes/common/parts/google_tag_manager_code_noscript.html.twig b/templates/themes/common/parts/google_tag_manager_code_noscript.html.twig new file mode 100644 index 000000000..05cdc93c3 --- /dev/null +++ b/templates/themes/common/parts/google_tag_manager_code_noscript.html.twig @@ -0,0 +1,8 @@ +{% if ibexa.configResolver.hasParameter('site_settings.google_tag_manager_code', 'ngsite') %} + {% set google_tag_manager_code = ibexa.configResolver.getParameter('site_settings.google_tag_manager_code', 'ngsite') %} + + {% if google_tag_manager_code is not empty %} + + {% endif %} +{% endif %} diff --git a/templates/themes/common/parts/google_tag_manager_code_script.html.twig b/templates/themes/common/parts/google_tag_manager_code_script.html.twig new file mode 100644 index 000000000..fdba94c72 --- /dev/null +++ b/templates/themes/common/parts/google_tag_manager_code_script.html.twig @@ -0,0 +1,11 @@ +{% if ibexa.configResolver.hasParameter('site_settings.google_tag_manager_code', 'ngsite') %} + {% set google_tag_manager_code = ibexa.configResolver.getParameter('site_settings.google_tag_manager_code', 'ngsite') %} + + {% if google_tag_manager_code is not empty %} + + {% endif %} +{% endif %} diff --git a/templates/themes/common/parts/opengraph.html.twig b/templates/themes/common/parts/opengraph.html.twig new file mode 100644 index 000000000..2b1a46543 --- /dev/null +++ b/templates/themes/common/parts/opengraph.html.twig @@ -0,0 +1,15 @@ +{% if open_graph is defined %} + {% for key, value in open_graph %} + + {% endfor %} +{% endif %} + +{% if content is defined %} + {% set meta_tags = get_netgen_open_graph(content.innerContent) %} + + {% for meta_tag in meta_tags %} + {% if open_graph is not defined or open_graph[meta_tag.tagName] is not defined %} + + {% endif %} + {% endfor %} +{% endif %} diff --git a/translations/ngsite.en.yaml b/translations/ngsite.en.yaml new file mode 100644 index 000000000..aae5b33fd --- /dev/null +++ b/translations/ngsite.en.yaml @@ -0,0 +1,2 @@ +pagination.previous: 'Previous' +pagination.next: 'Next'