Skip to main content
Active Contributor I
September 26, 2023
Solved

Why does my Hide/Show logic show extra white space in template?

Hi, I used this solution in the article to tackle a similar problem and it kinda worked too. 

 The solution to my problem was to use a conditional else/if statement like this-

{% if event.line_price != 0 %} {{ event.name|default:'' }} {% endif %}

But now, as you can see in the image below, I am getting all of this white space from the content that is hidden. So is there no way to remove this?

 

This topic has been closed for replies.
Taylor Tarpley
Community Manager
September 26, 2023

Hi there @rohan12334, 

 

Thanks for your question! Happy to help!

 

Great job so far finding great Community resources dealing with show/hide logic!

 

So there shouldn’t be white space for any content the logic skips over in the email, so this leads me to believe that the white space is due to some kind of hidden formatting in your block. I would investigate the code in this last block and clear any formatting or external stylings to rectify the issue!

 

Thanks for participating in the Community! 

-Taylor 

1 reply

Taylor Tarpley
Community Manager
Community Manager
September 26, 2023

Hi there @rohan12334, 

 

Thanks for your question! Happy to help!

 

Great job so far finding great Community resources dealing with show/hide logic!

 

So there shouldn’t be white space for any content the logic skips over in the email, so this leads me to believe that the white space is due to some kind of hidden formatting in your block. I would investigate the code in this last block and clear any formatting or external stylings to rectify the issue!

 

Thanks for participating in the Community! 

-Taylor