Add Module after certain number of words in blog post?
SOLVE
I wanto have a certain module embedded in the text of my blog posts after, let's say 300 words. Is there a way to do this with Hubl to say "add module x after 400 words"?
{% set wordArray = module.content|split(' ') %}
{% set contentArray = wordArray.insert(400, 'set your HubL for the module here') %}
{% set content = contentArray|join(' ') %}
{{content}}
This is not tested, not sure if HubL will work if it is passed as a string, but could be worth a try. Change the 400 to any index you want.
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.