Skip to main content
Solved

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

  • 26 September 2023
  • 1 reply
  • 98 views

Forum|alt.badge.img+4

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?

 

Best answer by Taylor Tarpley

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 

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Taylor Tarpley
Community Manager
Forum|alt.badge.img+60
  • Community Manager
  • 2148 replies
  • Answer
  • 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