have this table that I want to display only if one parameter set in a matrix cell has a value of 1:
{exp:channel:entries channel="{canale_corrente}" limit="1" disable="member_data|pagination|categories"}
{formati_prodotti}
{if enable_shop_lnk == "1"}
<div class="small-12 column">
<div class="content-box">
<h2>TITLE</h2>
<p class="subhead">SUBTITLE</p>
<table width="100%">
<thead>
<tr>
<td>Formato</td>
<td>Shop</td>
</tr>
</thead>
<tbody>
<tr>
<td>{codice_formato} - {nome_formato}</td>
<td><a href="#" class="tiny button radius">BUY</a></td>
</tr>
</tbody>
</table>
</div>
</div>
{/if}
{/formati_prodotti}
{/exp:channel:entries}
CAPTION:
{formati_prodotti} is a matrix field
enable_shop_lnk is a child field inside {formati_prodotti} that can be 0 or 1
the problem is that I can't find a way to hide the entire table when there's no records with enable_shop_lnk == 0
Also because the enable_shop_link is inside a matrix field I can check it only by wrapping it with the matrix field {formati_prodotti} and if there's more than one entry meeting the criteria I get more than one table!
Any idea!