- Posts: 6
COMMUNITY FORUM
Preferred Template Installation Path
- Evagelos Papadopoulos
- Topic Author
- Offline
- New Member
Less
More
12 years 4 months ago #66704
by Evagelos Papadopoulos
Preferred Template Installation Path was created by Evagelos Papadopoulos
Hi,
As I am very new with Joomla and K2 I am currently trying to implement my own custom templates for various K2 category listings as well as single items. For reference please note that I use Joomla 2.5 and the latest version of K2 2.5.7
Reading through various online articles and sporadic documentation it appears that there are two choices with regards to the preferred installation path.
One approach seems to be leaving the default template as well as other custom templates under /components/com_k2/templates.
However there are also several references including one from this official site (getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates) that recommend replicating the K2 template folder structure under /templates/[SiteTemplate]/html/com_k2.
Furthermore and having actually tried both approaches they both do seem to work as I can see the selection for my custom templates under the category administration
Considering all of the above, can someone shed any more light as to which one is a preferred approach and whether there are any advantages or disadvantages with each one?
As I am very new with Joomla and K2 I am currently trying to implement my own custom templates for various K2 category listings as well as single items. For reference please note that I use Joomla 2.5 and the latest version of K2 2.5.7
Reading through various online articles and sporadic documentation it appears that there are two choices with regards to the preferred installation path.
One approach seems to be leaving the default template as well as other custom templates under /components/com_k2/templates.
However there are also several references including one from this official site (getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates) that recommend replicating the K2 template folder structure under /templates/[SiteTemplate]/html/com_k2.
Furthermore and having actually tried both approaches they both do seem to work as I can see the selection for my custom templates under the category administration
Considering all of the above, can someone shed any more light as to which one is a preferred approach and whether there are any advantages or disadvantages with each one?
Please Log in or Create an account to join the conversation.
- Katharina
- Offline
- Senior Member
Less
More
- Posts: 54
12 years 4 months ago #66705
by Katharina
Replied by Katharina on topic Re: Preferred Template Installation Path
If you want to change anything about the K2 template then copy it to the second path you mentioned and do you changes there. More here: bit.ly/KYZmaL
Please Log in or Create an account to join the conversation.
- Evagelos Papadopoulos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
12 years 4 months ago #66706
by Evagelos Papadopoulos
Replied by Evagelos Papadopoulos on topic Re: Preferred Template Installation Path
Thank you indeed for your prompt reply Katharina, however still there some questions....
Even after following the approach of installing the custom K2 templates under the site's template structure ( /templates/[SiteTemplate]/html/com_k2) still some documentation suggests to use this as the root folder for the templates while a very popular plugin's (Css4K2) instructions is to add a further folder to the path /templates/[SiteTemplate]/html/com_k2/templates and then create the folders for your template...
Any further feedback on that would be most appreciated...
Even after following the approach of installing the custom K2 templates under the site's template structure ( /templates/[SiteTemplate]/html/com_k2) still some documentation suggests to use this as the root folder for the templates while a very popular plugin's (Css4K2) instructions is to add a further folder to the path /templates/[SiteTemplate]/html/com_k2/templates and then create the folders for your template...
Any further feedback on that would be most appreciated...
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 4 months ago #66707
by william white
Replied by william white on topic Re: Preferred Template Installation Path
If you are using css4k2 you should do as you first did, then put a copy of k2.css in each override directory, and rename it to youroverridename_style.css for an indivual css file for each of your overrides...
Please Log in or Create an account to join the conversation.
- Evagelos Papadopoulos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
12 years 4 months ago #66708
by Evagelos Papadopoulos
Replied by Evagelos Papadopoulos on topic Re: Preferred Template Installation Path
Hi William,
and thank you for your feedback which I did implement and seems to work just fine...!!
However and from an "academic" point of view only why are there these two approaches:
1. /components/com_k2/templates
2. /templates/[SiteTemplate]/html/com_k2/templates
and to your knowledge are there any benefits from one or the other..?
and thank you for your feedback which I did implement and seems to work just fine...!!
However and from an "academic" point of view only why are there these two approaches:
1. /components/com_k2/templates
2. /templates/[SiteTemplate]/html/com_k2/templates
and to your knowledge are there any benefits from one or the other..?
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 4 months ago #66709
by william white
Replied by william white on topic Re: Preferred Template Installation Path
simple, if you use 1. you will loose your changes when you upgrade k2
Joomla overrides are designed to be kept out of the way of upgrades, and #2 is the correct way to override any component
Joomla overrides are designed to be kept out of the way of upgrades, and #2 is the correct way to override any component
Please Log in or Create an account to join the conversation.
- Evagelos Papadopoulos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
12 years 4 months ago #66710
by Evagelos Papadopoulos
Replied by Evagelos Papadopoulos on topic Re: Preferred Template Installation Path
...crystal clear and to the point...!!
Thank you indeed for feedback...
Thank you indeed for feedback...
Please Log in or Create an account to join the conversation.