CMS Development

Vanessa_megg
Member

Gallery shortcode in blog post

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.

0 Upvotes
3 Replies 3
stefen
Key Advisor | Partner
Key Advisor | Partner

Gallery shortcode in blog post

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, Community Champion, Kelp Web Developer
0 Upvotes
giozua
Contributor | Platinum Partner
Contributor | Platinum Partner

Gallery shortcode in blog post

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 

stefen
Key Advisor | Partner
Key Advisor | Partner

Gallery shortcode in blog post

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, Community Champion, Kelp Web Developer
0 Upvotes