Gallery shortcode in blog post

New Contributor

Hello everyone, 
There is the possibility of creating a gallery and bring his shortcode in a blog post? Or a similar feature?
Thanks in advance for your cooperation.

Reply
0 Upvotes
3 Replies 3
Advisor

The only way to do this is to edit your blog post template and add the HubL code for the module. e.g.:

{% gallery "crm_gallery" %}

 I'd also suggest wrapping it with an if statement so it only displays on the blog posts that have images in the module.

--
Stefen Phelps
Web Developer / Co-founder
Kelp Creative Agency
Twitter — @stefen
Reply
0 Upvotes
Highlighted
Regular Contributor

I've tried to insert the code

{% gallery "crm_gallery" %}

but unfortunately I get this error
UnknownTagException: Syntax error in '{% gallery "crm_gallery" %}': Unknown tag: gallery

Why?

I've tried with an image slider with this code
{% image_slider "image_slider" %}
And all work fine

but for the gallery, nothing good 

Advisor

That is the newer version of their image_slider module using slick.js rather than cycle2.js - They haven't added support for it in their blog templates apparently. I'd open a HubSpot Support Ticket for that.

--
Stefen Phelps
Web Developer / Co-founder
Kelp Creative Agency
Twitter — @stefen
Reply
0 Upvotes