La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
How to pass data to a nested group in a custom module in a template?
Résolue
Hello. I'm hoping someone can shed some light on this.
I have a template with a series of custom modules and I'm trying to replace the default content in some of the fields with content specific to the type of template.
In this example I have a field for the heading and field for the copy - both are Rich Text. These are contained in the Text Settings group for the module. How can I set different text for those fields?
I've tried the code below but can only get one field or the other working, but not both. What am I missing? Thanks.
How to pass data to a nested group in a custom module in a template?
Résolue
Finally got it sorted - revised code below if anyone else has a similar issue:
{% dnd_section %}
{% dnd_column %}
{% dnd_row %}
{% dnd_module path="../modules/Text Row with Image"%}
{% module_attribute "text_settings" %}
{
heading: "<h2>Intro Header</h2>",
copy: "<p>My Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>"
}
{% end_module_attribute %}
{% end_dnd_module %}
{% end_dnd_row %}
{% end_dnd_column %}
{% end_dnd_section %}
How to pass data to a nested group in a custom module in a template?
Résolue
Finally got it sorted - revised code below if anyone else has a similar issue:
{% dnd_section %}
{% dnd_column %}
{% dnd_row %}
{% dnd_module path="../modules/Text Row with Image"%}
{% module_attribute "text_settings" %}
{
heading: "<h2>Intro Header</h2>",
copy: "<p>My Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>"
}
{% end_module_attribute %}
{% end_dnd_module %}
{% end_dnd_row %}
{% end_dnd_column %}
{% end_dnd_section %}