Skip to content

Instantly share code, notes, and snippets.

@clnmcgrw
Last active April 4, 2017 00:37
Show Gist options
  • Save clnmcgrw/15d80523cb89891ee413db68026d200f to your computer and use it in GitHub Desktop.
Save clnmcgrw/15d80523cb89891ee413db68026d200f to your computer and use it in GitHub Desktop.
Hubspot COS / Hubl - Features We'd Love to See
{# (1) get another page's context #}
{% set other_landing_page = get_landing_page_by_id(123456); %}
{# (2) interpolate hubl variable values in module attribute values (particularly label attr) #}
{% set my_options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] %}
{% choice "repeats" label="Number of modules to print", value="1", choices="{{my_options}}", export_to_template_context=True %}
{% for options in my_options %}
{% if loop.index <= widget_data.repeats.value %}
{% rich_text 'column_text' label='Text Field {{loop.index}}', unique_in_loop=true %}
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment