- Posts: 26
- Thank you received: 1
hide position when filter module not displayed
9 years 10 months ago - 9 years 10 months ago #255419
by nalta
hide position when filter module not displayed was created 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 :
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
on my page. the module isn't displayed but I still get the container to show itself.
Thanks for your help !
Regards
-- 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">
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.
9 years 10 months ago #255420
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic hide position when filter module not displayed
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,
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.
9 years 10 months ago #255612
by nalta
Replied by nalta on topic hide position when filter module not displayed
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
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.
9 years 10 months ago #255614
by nicolas
Replied by nicolas on topic hide position when filter module not displayed
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.
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.
9 years 10 months ago #255728
by nalta
Replied by nalta on topic hide position when filter module not displayed
Okay I fixed it with :
Thanks for your help !
Regards
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.198 seconds