Jump to content

Hide the "Data sheet" tab if there is no data for Presta 1.7


markovo
 Share

Recommended Posts

Hello!

I want to hide the "Data sheet" tab (where the product features are displayed) when there are no features selected. Here is the code from my template:

{block name='product_features'}
    {if $product.grouped_features}
        <section class="product-features">
            <dl class="data-sheet">
                {foreach from=$product.grouped_features item=feature}
                    <dt class="name">{$feature.name}</dt>
                    <dd class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</dd>
                {/foreach}
            </dl>
        </section>
    {/if}
{/block}

What should I add to this code, so the "Data sheet" tab is hidden when there is no features selected for the product.

Edited by markovo
Spelling mistake (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More