- Posts: 7
- Thank you received: 0
Hide tabs if empty
- nancytoemen
-
Topic Author
- Offline
Less
More
9 years 9 months ago - 9 years 9 months ago #259754
by nancytoemen
Hide tabs if empty was created by nancytoemen
-- url of the page with the problem -- :
www.benevers.bio
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.6.4
Is it possible to hide tabs if there are no content in it?
At some of the products i have added a text in an tab i've created: 'recept' but i want to hide that tab if there is no text added. Is that possible?
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.6.4
Is it possible to hide tabs if there are no content in it?
At some of the products i have added a text in an tab i've created: 'recept' but i want to hide that tab if there is no text added. Is that possible?
Last edit: 9 years 9 months ago by nancytoemen.
Please Log in or Create an account to join the conversation.
9 years 9 months ago #259756
by nicolas
Replied by nicolas on topic Hide tabs if empty
Hi,
Add such code at the beginning of the show_tabular view file:
and then replace the two occurrences of $hide_specs == 0 by:
!empty($specif_tab_content)
in the same view file and that will do it.
Add such code at the beginning of the show_tabular view file:
Code:
//LAYOUT show_block_dimensions
$this->setLayout('show_block_dimensions');
$specif_tab_content = trim($this->loadTemplate());
if(!empty($this->fields)){
//LAYOUT show_block_custom_main
$this->setLayout('show_block_custom_main');
$specif_tab_content .= trim($this->loadTemplate());
!empty($specif_tab_content)
in the same view file and that will do it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.048 seconds