[Skip to main content](#vessel-content)

#   Hide tabs if empty

##

- **[nancytoemen](/forum/user/36112-nancytoemen "View nancytoemen's Profile")**
- [![nancytoemen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36112-nancytoemen "View nancytoemen's Profile") Topic Author
- [ Offline](/forum/user/36112-nancytoemen)

Less More

- Posts: 7
- Thank you received: 0
-
-

9 years 9 months ago -  9 years 9 months ago [\#259754](#259754) by [nancytoemen](/forum/user/36112-nancytoemen "View nancytoemen's Profile")  *[Hide tabs if empty](/forum/26-product-category-display/888357-hide-tabs-if-empty#259754 "-- 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?")* was created by *[nancytoemen](/forum/user/36112-nancytoemen "View nancytoemen's Profile")*

-- url of the page with the problem -- : [ www.benevers.bio](http://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?

Last edit: 9 years 9 months ago by [nancytoemen](/forum/user/36112-nancytoemen "View nancytoemen's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODgzNTctaGlkZS10YWJzLWlmLWVtcHR5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

9 years 9 months ago [\#259756](#259756) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hide tabs if empty](/forum/26-product-category-display/888357-hide-tabs-if-empty#259756 "-- 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?")*

Hi,

Add such code at the beginning of the show_tabular view file: Code:

//LAYOUT show_block_dimensions $this-&gt;setLayout('show_block_dimensions'); $specif_tab_content = trim($this-&gt;loadTemplate()); if(!empty($this-&gt;fields)){ //LAYOUT show_block_custom_main $this-&gt;setLayout('show_block_custom_main'); $specif_tab_content .= trim($this-&gt;loadTemplate());

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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODgzNTctaGlkZS10YWJzLWlmLWVtcHR5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.053 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
