CMS Development

samthompson
Member

Custom Modules on local server

In Hubl local server, does anyone know how to set an image src within the module? The content parameter gets passed but I can't figure out how to change the image from the default. "image-path.png" is not being passed to the module.

{% custom_widget "A Module" widget_name='A Module', label='', content='<h1>Some Content</h1>', background_image.src='image-path.png' %}

Thanks

0 Upvotes
1 Reply 1
caustin
Member | Diamond Partner
Member | Diamond Partner

Custom Modules on local server

Hey Sam, 

 

Parameters such as "content" and "background_image" don't exist for custom modules. If you are trying to set an img src within a custom module, you need to set the module up within the backend of HubSpot first with the specific syntax, then you call the module using the custom module hubl code

 

HubSpot has a nice tutorial on how to set up the module: https://knowledge.hubspot.com/design-manager-user-guide-v2/how-to-use-custom-modules-to-add-advanced...

0 Upvotes