1

I have:

{exp:channel:entries channel="products" limit="1" status="open"}

<ul class="arrow-side-2">
<li><h4>Properties</h4></li>
</ul>
    <p>{properties}</p>

<ul class="arrow-side-2">
<li><h4>Applications</h4></li>
</ul>
    <p>{applications}</p>

<ul class="arrow-side-2">
<li><h4>Production</h4></li>
</ul>
        <p>{production}</p>

<ul class="arrow-side-2">
<li><h4>Packaging</h4></li>
</ul>
    <p>{packaging}</p>

{/exp:channel:entries}

How do I hide:

<ul class="arrow-side-2">
<li><h4>Production</h4></li>
</ul>
        <p>{production}</p>

If there is nothing in the {production} field?

Thanks.

2 Answers 2

4

Or, you can just do:

{if production}<p>{production}</p>{/if}
3
  • Derek, thanks for fixing my code. I couldn't figure out how to display the code as code the proper way. Aug 23, 2013 at 15:53
  • I wanted to hide the whole thing so I put {if production} above <ul class="arrow-side-2"> That worked. Thanks guys!
    – design826
    Aug 26, 2013 at 18:53
  • Yeah, sorry. Not sure how I missed that part. Aug 27, 2013 at 0:40
0
{if production != ""}
    <p>{production}</p>
{/if}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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