CMS Development

Craig
Top Contributor

Remove wrapper from macro?

SOLVE

Can't find any docs regarding a no_wrapper option for macros - is there a way to remove the wrapping span element from a macro like with tags?

 

These wrappers just break layouts constantly.

0 Upvotes
1 Accepted solution
Jon_McLaren
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Remove wrapper from macro?

SOLVE

Macros don't output wrappers, mostly just HubL supported Tags, and custom module fields do. could you post your HubL so we can troublshoot?

Messages posted by this account have been preserved for their historical usefulness. Jon has a new profile now.

View solution in original post

0 Upvotes
3 Replies 3
Jon_McLaren
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Remove wrapper from macro?

SOLVE

Macros don't output wrappers, mostly just HubL supported Tags, and custom module fields do. could you post your HubL so we can troublshoot?

Messages posted by this account have been preserved for their historical usefulness. Jon has a new profile now.
0 Upvotes
Craig
Top Contributor

Remove wrapper from macro?

SOLVE

@ you are correct - thanks. I looked again and it was the calling of the macro via related posts module that was including the wrapper.

Replacing:

{% related_blog_posts limit=2, tags="{{ tags }}", post_formatter="blog_post_formatter" %}

With:

{% related_blog_posts limit=2, tags="{{ tags }}", no_wrapper=True, post_formatter="blog_post_formatter" %}

did the trick.

 

 

CDow
Participant | Elite Partner
Participant | Elite Partner

Remove wrapper from macro?

SOLVE

Thanks for posting your fix, had same issue thinking this was a problem with macros.

0 Upvotes