For all previous posts, this is working. But for a new post, there is no teaser text showing up, even though I saved “foo bar” as the teaser text. If I show the developer info for this post, content.widgets shows a property with a large number in it - module_14743118786401412_teaser_text - instead of just showing teaser_text. Therefore, no match is found and the teaser text is empty:
From you screenshot, it looks like the teaser text is part of a custom module. When defining a module within a custom module using HUBL, a unique id is added to the module name. If your trying to use the export_to_template_context it doesn’t work, because there is not a way to define the unique Id dynamically. You can read more about it here Accounts Dashboard | HubSpot.
The teaser_text module could be defined within you blog template directly without any issues.
I took a look into your templates and I think I might know what is wrong! I would fix it for you, but I didn’t want to overwrite anything in your code
So I noticed that your teaser text module is actually defined/created in a custom module, so you can’t simply access it using the usual:
{{ content.widgets.widget_name.body.html }}
because it technically isn’t created in your blog content module. Which is why in the inspect element, you are receiving the error “IPEUI: Widget not found in DOM”. When you reference a custom widget, that is created in a custom module, it changes it’s actual name, and you need to also reference your module, so the template knows where it’s actually pulling from. So instead of the above, try to reference it as:
FOR LISTING{{ content.widgets.module_14743118786401412_teaser_text.body.html }}FOR POST{{ widget_data.module_14743118786401412_teaser_text.html }}
You can find some more information on this and the export_to_template_context command here in our HubL docs. I hope this works out for you! Let me know if you still need some help and I can take a deeper look!