APIs & Integrations

Manobyte
Contributor | Diamond Partner
Contributor | Diamond Partner

Printing a value from a custom module

So im trying to print a value from a custom module and ive read:

Custom Modules

Custom Modules allow HubSpot designers and developers to create a custom group of editable content objects that maintain their style across individual templates and pages on HubSpot’s COS, while still allowing marketers to control the specific...



and

but im still having trouble getting it to work. My custom module is defined as follows,
{% custom_widget “module_1468601024505138047” custom_widget_id=4416014825, widget_name=“Pop Open Video”, overrideable=true, label=“Pop Open Video”, export_to_template_context=True %}
The value I am trying to pull from is a text field named video_wistia_code and I have tried to use these values to no avail.
{{ widget_data.module_1468601024505138047_video_wistia_code }}
{{ widget_data.module_1468601024505138047_video_wistia_code.value }}
{{ widget_data.module_1468601024505138047.video_wistia_code.value }}
{{ widget_data.module_1468601024505138047.body.video_wistia_code.value }}
{{ widget_data.module_1468601024505138047.video_wistia_code.body.value }}

if it makes a difference I am trying to pull this info on a blog post page ( not the listing page ). I just want to pull a value from the widget, not the whole thing.

this is what is printed when i use {{ widget_data.module_1468601024505138047 }}

{css={}, video_image_width=1000, display_video=show, video_image_src=http://www.manobyte.com/hubfs/2016-Website-Img/Videos/GRG.png, type=custom_widget, body={display_video=show, video_title=“GRG ATHLEATS”, title=Project Details, text=
It takes hard work, dedication and sacrifice that you cannot really imagine. It’s 100% all-out or nothing.
, video_wistia_code=i2hkfdmv05, video_image_src=http://www.manobyte.com/hubfs/2016-Website-Img/Videos/GRG.png, video_image_width=1000, video_image_height=563, video_image_original_width=1000, video_image_original_height=563, video_image_alt=GRG.png, video_image={src=http://www.manobyte.com/hubfs/2016-Website-Img/Videos/GRG.png, width=1000, height=563, original_width=1000, original_height=563, alt=GRG.png}, auto_play_=&autoPlay=true, widget_name=Pop Open Video}, title=Project Details, field_types={video_image=image, video_title=text, auto_play_=choice, display_video=choice, video_wistia_code=text, text=richtext, title=text}, video_image={src=http://www.manobyte.com/hubfs/2016-Website-Img/Videos/GRG.png, width=1000, height=563, original_width=1000, original_height=563, alt=GRG.png}, custom_widget_id=4416014825, video_image_original_height=563, video_image_height=563, id=module_1468601024505138047, text=
It takes hard work, dedication and sacrifice that you cannot really imagine. It’s 100% all-out or nothing.
, widget_name=Pop Open Video, overrideable=true, video_image_original_width=1000, parent_widget_container=null, label=Pop Open Video, smart_type=null, export_to_template_context=true, video_title=“GRG ATHLEATS”, auto_play_=&autoPlay=true, video_image_alt=GRG.png, child_css={}, name=module_1468601024505138047, video_wistia_code=i2hkfdmv05}

0 Upvotes
1 Reply 1
Manobyte
Contributor | Diamond Partner
Contributor | Diamond Partner

Printing a value from a custom module

So im not sure how I missed this, im sure I tested it but
{{ widget_data.module_1468601024505138047.video_wistia_code }}
has worked for me.

0 Upvotes