- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Potential work around for having only one blog post template
Sep 23, 2020 3:34 PM
Hi Guys!
So I know it can be frustrating sometimes with the limitation of only having one blog post template to use for posts on a blog, sometimes you might want to add new modules to a blog post and only have it appear on that page or be able to choose to have it appear?
So I've encountered this a few times and had to come up with a workaround, so I found that we can use boolean logic on a module to add a toggle on/off switch which is very useful for our blog post template because it means that we can choose which pages certain modules appear on.
In order to do this we have to create a module that we can use, in this case the form module, So I cloned the module and added this code snippet to the module enclosing it's HTML inbetween:
{% if module.hide_show_section %}
<!-- HTML to show when checked -->
{% endif %}
We then used a Boolean field to add our toggle so we can toggle the module on and off, I know this seems complicated so once again I created a video and walked you through every step of the process on how I created the module and how we can use it on the blog going forward here: Loom.
Any questions on this just let me know!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content