dimanche 17 juillet 2016

If content field is empty display none

I'm trying to code a CMS with Bolt / Twig. Not very familiar with it, so need a little help.

On one page there's supposed to be an image that has a link in it. But if contentlink or image is empty it should be display none. So i wrote:



Liquid error: Unknown operator is

The CSS is just:

.none {
display: none;
}

Problem is that if contentlink is empty a small box shows up where the link would have been:

Like this

Any tips?

Aucun commentaire:

Enregistrer un commentaire