DIV Layouts - templating idea for wish list
- brainforge
-
Topic Author
- Offline
Less
More
15 years 3 months ago #18932
by brainforge
DIV Layouts - templating idea for wish list was created by brainforge
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.
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 or Create an account to join the conversation.
15 years 3 months ago #18935
by nicolas
Replied by nicolas on topic Re: DIV Layouts - templating idea for wish list
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 ?
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 or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
15 years 3 months ago #18962
by brainforge
Replied by brainforge on topic Re: DIV Layouts - templating idea for wish list
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.
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 or Create an account to join the conversation.
15 years 3 months ago #19082
by nicolas
Replied by nicolas on topic Re: DIV Layouts - templating idea for wish list
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.
We've added your modifications and fixed that. It will be in next release.
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds