Jump to content

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


Recommended Posts


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>

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)
Link to comment
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
  • Create New...