CMS Development

SirHubalot
Membre

Setting A Choice Property For A Module From Page Template

Résolue

In a page template, I'm passing a value to my module to set the value of a choice property. Based on the documentation, I should be able to do this in the following manner:

 

{% module "related-posts" path='/path', label="Related Posts",
  language_select="option_1"
%}

 

This doesn't seem to work for me as the choice field when viewing the page template doesn't get set and displays the "option_1" value.

 

I've tried to pass the property value as the label as well, which doesn't work either.

 

Thanks for any help!

 

0 Votes
1 Solution acceptée
piersg
Solution
Conseiller clé

Setting A Choice Property For A Module From Page Template

Résolue

It should work if you do this

{% module_block module "related-posts" wrapping_html='', per_widget_wrapper_html='', overrideable=True, widget_name='Related posts', module_id=1234, path='/path', language_select='option_1', label='Related posts' %}
{% end_module_block %}

Voir la solution dans l'envoi d'origine

2 Réponses
piersg
Solution
Conseiller clé

Setting A Choice Property For A Module From Page Template

Résolue

It should work if you do this

{% module_block module "related-posts" wrapping_html='', per_widget_wrapper_html='', overrideable=True, widget_name='Related posts', module_id=1234, path='/path', language_select='option_1', label='Related posts' %}
{% end_module_block %}
Teun
Expert reconnu | Partenaire solutions Diamond
Expert reconnu | Partenaire solutions Diamond

Setting A Choice Property For A Module From Page Template

Résolue

Hi @SirHubalot ,

 

Are you using a dnd template?

If so, try this:

{% dnd_section %}
  {% dnd_module
    path = '<path-to-module>',
    width = 12,
    offset = 0,
    language_select = 'option_1'
  {% end_dnd_module %}
{% end_dnd_section %}


Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.