Solved

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

  • 26 September 2023
  • 1 reply
  • 66 views

Badge +3

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?

 

icon

Best answer by Taylor Tarpley 26 September 2023, 22:26

View original

1 reply

Userlevel 7
Badge +60

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 

Reply