{# configuration example
###########
enabled: false
container: w-100
title:
type: h1
content: Bienvenue
class: ''
enabled: true
text:
content: 'Bienvenue sur votre plateforme'
type: p
class: ''
enabled: true
link:
enabled: false
tel: ''
mailto: null
url: ''
route: ''
params: ''
class: ''
target: _self
content: dsdsd
#}
{% if componentKey is not defined %}
{% set componentKey = "default_title_paragraph" %}
{% endif %}
{% set item_config = generateComponentOptions(value, componentKey)%}
{% if canDisplayComponentByAcl(item_config) %}
<div data-component-acl="{{ componentKey }}" class="{{ item_config.container.class }}">
{% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.title, atom_key: componentKey ~ '.title'} %}
{% block atom %}
{% include'@component/atom/title.html.twig' with {'title': value} %}
{% endblock atom %}
{% endembed %}
{% if value.text is defined %}
{% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.text, atom_key: componentKey ~ '.text'} %}
{% block atom %}
{% include'@component/atom/paragraph.html.twig' with {'value': value} %}
{% endblock atom %}
{% endembed %}
{% endif %}
{% if value.link is defined %}
{% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.link, atom_key: componentKey ~ '.link'} %}
{% block atom %}
<div {% if value.wrapper is defined and value.wrapper.class is defined %}class="{{ value.wrapper.class }}"{% endif %}>
{% include '@component/atom/link.html.twig' with {'link': value} %}
</div>
{% endblock atom %}
{% endembed %}
{% endif %}
</div>
{% endif %}