Hi guys!
I need to show or hide the quote section in my blog post template.
I did this using the use_the_quote_section boolean field in my Quote Module Optional.
So I either show or don’t show this block.
But I had such a problem that when I do not show this block, I have unnecessary blocks in the layout.
Maybe I’m doing something wrong and it can be done in another way? Is it still possible to set the condition itself (to show or not to show) in the post template?
CMIIW, I assume you use module option to show or hide with boolean value.
The component that you highlighted is produced by this code (in the blog-post.html):

Now, you hide and show in this only:

Solution you can do:
1. Delete module above if it’s not used anymore
2. bring module above into your module.
I can’t remove this module yet because other pages are using it. But even if I do this, the problem with the remaining blocks remains, but these blocks will already be in the Quote Module Optional
{% module “module_16207352531104” path=“/landing-theme/modules/Quote Module”, label=“Quote Module” %}
And I conduct testing on my page using this module
{% module “module_166807518218723” path=“/landing-theme/modules/Quote Module Optional”, label=“Quote Module Optional” %}
I need to know if it is somehow possible to optionally show or not show these selected blocks in the screenshot
@febi_angiosty
I use both))))
I just deleted one module so as not to confuse you and formulated my question again.
In the first screenshot, the second module is commented out, so it is not displayed on my page.
I do this so as not to break the page on the production site.
I think I assume that you know about what you will do with Quote Module.
I’ll focus to Quote Module Optional. So, yes you need to delete that code that you highlighted into the module.
I’ll use this code:
file: Quote Module Optional
Do this:
{% if module.use_the_quote_section %}
<section class="blog-post__quote">
...........
</section
{% endif %}
and I see that your variable use_the_quote_section is not a boolean but it’s a “choice”

You need to change it into this:
Additional: if you want use “Choice”
{% if module.use_the_quote_section =='true' %}
<section ........
</section>
{% endif %}
note: I assume your value is true and false. you can change it based on your value
Hope my explanation is good enough. Hihihi
@febi_angiosty
Thank you very much for your patience, I’m new to hubspot))
it worked!!! I moved all the containers to my module and left only the import of the module itself in the template. Now that I see it, the answer is so obvious))
Glad to hear that. You are welcome. ![]()







