1

I made a content page (Channel) where the client can add a bunch of content. There will be multiple pages (1 page for every case) with the same layout. Sometimes they don't want to fill in every input field or asset. When they leave a field blank, I get an error.

Is it possible to just not show the parts they didn't fill in? For example: When I put the website in 'production' they show the broken IMG instead of nothing.

enter image description here

enter image description here

2

Make sure to add an if statement to check if the value exist or not with the length filter for example.

{% if entry.videoPhoto50 | length %}
   <img src="{{ entry.videoPhoto50  .....
   ....
{% endif %}

So that your code is only executed if entry.videoPhoto50 has a value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.