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

#   Button to change category list

##

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

Less More

- Posts: 4
- Thank you received: 0
-
-

11 years 10 months ago [\#182560](#182560) by [j.gsus](/forum/user/31006-j-gsus "View j.gsus's Profile")  *[Button to change category list](/forum/32-content-creation/873507-button-to-change-category-list#182560 "Hi,  How can I create a button in a category list, for example, that allow me to choose to show all the products in the category or to show the subcategories that cotains that products?  Thanks.")* was created by *[j.gsus](/forum/user/31006-j-gsus "View j.gsus's Profile")*

Hi,

How can I create a button in a category list, for example, that allow me to choose to show all the products in the category or to show the subcategories that cotains that products?

Thanks.

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

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile")
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 747
-
- [](http://www.inphase.one)
-

11 years 10 months ago [\#182572](#182572) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Button to change category list](/forum/32-content-creation/873507-button-to-change-category-list#182572 "Hi,  How can I create a button in a category list, for example, that allow me to choose to show all the products in the category or to show the subcategories that cotains that products?  Thanks.")*

Hi,

No offence, but the subject of your post is slightly misleading... it seems you don't want to "change" the category listing with an additional button, but just display the category contents.

First, the category title (and image, if existing) should work as links to the content. Correct? Or having trouble with it?

Next, if you prefer adding a button in addition to this, it's pretty simple and requires only basic knowledge of HTML and an open mind to reading and copying some PHP code:

1. Study [ the documentation here](http://www.hikashop.com/support/support/documentation/153-customize-the-display.html#layout).
2. In the HikaShop backend, via -&gt; Display -&gt; Views, find and open the "category / listing\_img\_title" (or whichever type of view you're using) for your frontend template.
3. Add the code for your button where you prefer it to show, probably as an &lt;a&gt; element with the usual button classes.
4. For the href="" part, copy and paste the PHP link part from elsewhere in the same file.
5. Save, and test by reloading your site in the frontend.

Should work just fine.

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

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

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

Less More

- Posts: 4
- Thank you received: 0
-
-

11 years 10 months ago [\#182579](#182579) by [j.gsus](/forum/user/31006-j-gsus "View j.gsus's Profile")  Replied by *[j.gsus](/forum/user/31006-j-gsus "View j.gsus's Profile")* on topic *[Button to change category list](/forum/32-content-creation/873507-button-to-change-category-list#182579 "Hi,  How can I create a button in a category list, for example, that allow me to choose to show all the products in the category or to show the subcategories that cotains that products?  Thanks.")*

Sorry but it's difficult to me to explain in english.

What I want is a button in the SUBcategories list of a parent category, that show the full list of products within the parent category.

Thanks.

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

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile")
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 747
-
- [](http://www.inphase.one)
-

11 years 10 months ago [\#182584](#182584) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Button to change category list](/forum/32-content-creation/873507-button-to-change-category-list#182584 "Hi,  How can I create a button in a category list, for example, that allow me to choose to show all the products in the category or to show the subcategories that cotains that products?  Thanks.")*

Pretty much everything is possible, and so is this. Only, it's a bit trickier and, other than editing a different view, it requires more work and definitely more PHP knowledge for adding the code. If you're not capable yourself, you may want to hire a developer to do it for you.

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTA3LWJ1dHRvbi10by1jaGFuZ2UtY2F0ZWdvcnktbGlzdD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

11 years 10 months ago [\#182599](#182599) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Button to change category list](/forum/32-content-creation/873507-button-to-change-category-list#182599 "Hi,  How can I create a button in a category list, for example, that allow me to choose to show all the products in the category or to show the subcategories that cotains that products?  Thanks.")*

Hi,

A simple solution would be to create a products listing menu item for each category via the Joomla menu manager and add the link to it in a custom category field that you would create via the menu Display&gt;Custom fields (it requires the Essential or the Business edition). Then, you could just add such code in the "listing" file of the view "category" in order to add a link to the menu item with the products:
&lt;?php if(!empty($this-&gt;element-&gt;custom_field)) echo '&lt;a href="'.$this-&gt;element-&gt;custom_field.'"&gt;Products of the category&lt;/a&gt;'; ?&gt;
where you would replace "custom_field" with the column name of your custom category field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTA3LWJ1dHRvbi10by1jaGFuZ2UtY2F0ZWdvcnktbGlzdD90bXBsPW1hcmtkb3du) 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.115 seconds

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

[](#top)
