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

#   DIV Layouts - templating idea for wish list

##

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#18932](#18932) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[DIV Layouts - templating idea for wish list](/forum/2-general-talk-about-hikashop/18932-div-layouts-templating-idea-for-wish-list#18932 "In Joomla go to Extensions / Modules / Select a menu module. Go to Advanced Options / Alternative Layout is a drop-down list which looks like:  -- From Module -- Default -- From My Template -- type1 type2 type3  In the Hikashop Parameters for DIV / Type of Item Layout dropdown would it be possible at some point to do something similar and pickup template defined layouts in addition to the standard Hikashop ones? I guess feature would need to be controlled somehow by an XML file in the template.  Can achieve this currently by using a custom category / product field and then coding the view override according to the setting of that field, so its not a high priority.")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

In Joomla go to Extensions / Modules / Select a menu module.
Go to Advanced Options / Alternative Layout is a drop-down list which looks like:

**-- From Module --**
Default
**-- From My Template --**
type1
type2
type3

In the Hikashop *Parameters for DIV / Type of Item Layout* dropdown would it be possible at some point to do something similar and pickup template defined layouts in addition to the standard Hikashop ones? I guess feature would need to be controlled somehow by an XML file in the template.

Can achieve this currently by using a custom category / product field and then coding the view override according to the setting of that field, so its not a high priority.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE4OTMyLWRpdi1sYXlvdXRzLXRlbXBsYXRpbmctaWRlYS1mb3Itd2lzaC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

15 years 4 months ago [\#18935](#18935) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: DIV Layouts - templating idea for wish list](/forum/2-general-talk-about-hikashop/18932-div-layouts-templating-idea-for-wish-list#18935 "In Joomla go to Extensions / Modules / Select a menu module. Go to Advanced Options / Alternative Layout is a drop-down list which looks like:  -- From Module -- Default -- From My Template -- type1 type2 type3  In the Hikashop Parameters for DIV / Type of Item Layout dropdown would it be possible at some point to do something similar and pickup template defined layouts in addition to the standard Hikashop ones? I guess feature would need to be controlled somehow by an XML file in the template.  Can achieve this currently by using a custom category / product field and then coding the view override according to the setting of that field, so its not a high priority.")*

You can add your file in the folder components/com_hikashop/views/product/html/ and make its name start with listing_ and it will be added automatically to the dropdown selection.
However, if you use joomla 1.6, the installation process of joomla removes the whole component folder before installing the new files so you would loose the file when you update. That works fine with joomla 1.5 though.

The solution should be easy... Just changing the file administrator/components/com_hikashop/types/item.php to add the views folders of the main template. Do you see what I mean ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE4OTMyLWRpdi1sYXlvdXRzLXRlbXBsYXRpbmctaWRlYS1mb3Itd2lzaC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#18962](#18962) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: DIV Layouts - templating idea for wish list](/forum/2-general-talk-about-hikashop/18932-div-layouts-templating-idea-for-wish-list#18962 "In Joomla go to Extensions / Modules / Select a menu module. Go to Advanced Options / Alternative Layout is a drop-down list which looks like:  -- From Module -- Default -- From My Template -- type1 type2 type3  In the Hikashop Parameters for DIV / Type of Item Layout dropdown would it be possible at some point to do something similar and pickup template defined layouts in addition to the standard Hikashop ones? I guess feature would need to be controlled somehow by an XML file in the template.  Can achieve this currently by using a custom category / product field and then coding the view override according to the setting of that field, so its not a high priority.")*

I got this working - modified *administrator/components/com\_hikashop/types/item.php* as attached.

Create a template file *listing\_mydemo.php* (say copy *listing\_title.php*) and place it in:
templates/mytemplate/html/com_hikashop/category/listing_mydemo.php

Tested with PHP 5.3 and Joomla 1.6.

One bug, I could not quickly figure out - the *optgroup* is not being shown for the templates.
Can you see what I am doing wrong?

Already found this very useful and a better way of managing custom template views.

Could this be incorporated into core Hikashop please?

####  *This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE4OTMyLWRpdi1sYXlvdXRzLXRlbXBsYXRpbmctaWRlYS1mb3Itd2lzaC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

15 years 4 months ago [\#19082](#19082) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: DIV Layouts - templating idea for wish list](/forum/2-general-talk-about-hikashop/18932-div-layouts-templating-idea-for-wish-list#19082 "In Joomla go to Extensions / Modules / Select a menu module. Go to Advanced Options / Alternative Layout is a drop-down list which looks like:  -- From Module -- Default -- From My Template -- type1 type2 type3  In the Hikashop Parameters for DIV / Type of Item Layout dropdown would it be possible at some point to do something similar and pickup template defined layouts in addition to the standard Hikashop ones? I guess feature would need to be controlled somehow by an XML file in the template.  Can achieve this currently by using a custom category / product field and then coding the view override according to the setting of that field, so its not a high priority.")*

Thanks. In joomla 1.6, the optgroup needs to be called twice. Once before the options and once after.
We've added your modifications and fixed that. It will be in next release.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE4OTMyLWRpdi1sYXlvdXRzLXRlbXBsYXRpbmctaWRlYS1mb3Itd2lzaC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.096 seconds

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