Skip to main content

hide position when filter module not displayed

More
9 years 10 months ago - 9 years 10 months ago #255419 by nalta
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.3

Hi there !
I didn't found somewhere in this forum where you solved this situation :

This is my index.php code :
Code:
<?php if ($this->countModules('left')) : ?> <aside class="col-md-4"> <jdoc:include type="modules" name="left" style="xhtml"/> </aside> <div class="col-md-8"> <?php else : ?> <div class="col-xs-12"> <?php endif; ?>

When there are no module published in left, the whole aside stuff shouldn't display.
The problem is with hikashop filtering module I set the "Display on the product page" option to no
and i stil get
Code:
<aside class="col-md-4"> </aside> <div class="col-md-8">
on my page. the module isn't displayed but I still get the container to show itself.

Thanks for your help !
Regards
Last edit: 9 years 10 months ago by nalta.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #255420 by Jerome
Hi,

Please check all your modules in the position "left".
Your template do not know that the modules have no content ; but he just know that there is published modules.
If the block is there, it means that you have a published module in that position and you have a module which return an empty content.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #255612 by nalta
Hi,
Thank you for trying to help.

Thats what I'm saying I have no other module in position "left" except hikashop filtering module.
When I set I set the "Display on the product page" option to no it returns an empty content ...

Regards

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #255614 by nicolas
Hi,

HikaShop cannot hide a position of the template when a module of HikaShop is empty.
All HikaShop can do is make sure that the HTML returned by the module is empty.
Then, it's up to the template to check that the HTML returned is empty so that it displays the position HTML or not.
Here is for example a thread talking about possibilities to do that by default in Joomla and with a solution at the end for templates:
groups.google.com/forum/#!topic/joomlabugsquad/8hcxWyyNpxc
Here is another solution for templates:
forum.joomla.org/viewtopic.php?t=324899

The bottom line is that we can't give you a precise solution as it has to be done in the template and thus you should contact your template provider.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #255728 by nalta
Okay I fixed it with :
Code:
if(JModuleHelper::renderModule(array_shift(JModuleHelper::getModules( 'left' ))) == "") :

Thanks for your help !

Regards

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds
Powered by Kunena Forum