Custom template - help needed using the element->containerClass - no dataempty class

maverickweb

New Member
Hi all, appreciate any advice or pointers on this one.

I have a custom template that displays certain fields like this:

Code:
        <div class="gallery example">
            <?php  $subGroups = $this->groups['Remake_remake_gallery']->subgroups;
                    foreach ($subGroups as $subGroup)
                    {
                      $this->element = $subGroup['filename'];
                      echo $this->loadTemplate('element');
                   
                    $this->element = $subGroup['caption'];
                      echo $this->loadTemplate('element');
                      }?>
        </div>

Basically what I'm trying to achieve is to hide the whole Div if the inner content is empty. So if no data to show then i would like to hide this area on the front-end via css.

I know it's possible to do this using the following:
Code:
<div <?php echo @$this->element->column;?> class="<?php echo $this->element->containerClass;?>">

But when I add that code to the above "gallery example" div it does not make a difference on the front-end.

specifically i'm looking to insert the data-empty tag in the div's class, but because this is a level above the fabrik code it appears its unable to work.

Is there a way to specifically call the exact element within the containerClass?

Thanks in advance for any pointers.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top