- Posts: 3
COMMUNITY FORUM
sub templates, cannot get it to work
- John Horrocks
-
Topic Author
- Offline
- New Member
Less
More
14 years 9 months ago #86940
by John Horrocks
sub templates, cannot get it to work was created by John Horrocks
I have been using Joomla for a year now, and K2 is the best component I have ever used!My question is in regard to the article: community.getk2.org/notes/Templating_in_K2This
article provides a detailed step by step process to create multiple sub
templates. I followed the directions to the best of my knowledge and I
still cannot get my sub templates to work. My goal is to have a
different k2 category and item design for each category that I create.I copied the component/com_k2/templates/default folder and it's files into the folder templates/my_new_k2_template/html/com_k2/templates/ and renamed it to my_k2_template. So the result was website_root_directory/templates/my_new_k2_template/html/com_k2/templates/my_k2_template.After
that, I went into the backend of K2, created a new Category, tried to
change the template, and the only thing that was available was
'default.' I am a little confused! Obviously I missed a very important
step! Could someone please help me! Thanks in advance...www.klcy-kvel.comBrian This email address is being protected from spambots. You need JavaScript enabled to view it.
article provides a detailed step by step process to create multiple sub
templates. I followed the directions to the best of my knowledge and I
still cannot get my sub templates to work. My goal is to have a
different k2 category and item design for each category that I create.I copied the component/com_k2/templates/default folder and it's files into the folder templates/my_new_k2_template/html/com_k2/templates/ and renamed it to my_k2_template. So the result was website_root_directory/templates/my_new_k2_template/html/com_k2/templates/my_k2_template.After
that, I went into the backend of K2, created a new Category, tried to
change the template, and the only thing that was available was
'default.' I am a little confused! Obviously I missed a very important
step! Could someone please help me! Thanks in advance...www.klcy-kvel.comBrian This email address is being protected from spambots. You need JavaScript enabled to view it.
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 9 months ago #86941
by william white
Replied by william white on topic sub templates, cannot get it to work
website_root_directory/templates/my_new_k2_template/html/com_k2/templates/my_k2_template.
I think it should be
website_root_directory/templates/YourCurrentTemplate/html/com_k2/templates/my_k2_template.
I think it should be
website_root_directory/templates/YourCurrentTemplate/html/com_k2/templates/my_k2_template.
Please Log in or Create an account to join the conversation.
- John Horrocks
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
14 years 9 months ago #86942
by John Horrocks
Replied by John Horrocks on topic sub templates, cannot get it to work
Thank you for helping me correct that, some of those details I easily overlook...
However, when I create a category, 'use default' is still the only option given when choosing the template. I cleared the browser cache and even tried it in a different browser. Still the same result.
However, when I create a category, 'use default' is still the only option given when choosing the template. I cleared the browser cache and even tried it in a different browser. Still the same result.
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 9 months ago #86943
by Jiliko.net
Replied by Jiliko.net on topic sub templates, cannot get it to work
Hi Brian,
You really have to care about the path, as William has written :
website_root_directory/templates/YourJoomlaTemplate/html/com_k2/templates/my_k2_template
In that folder, there should be the files from the 'Default' K2 template folder.
Olivier
Brian Greene said:Thank you for helping me correct that, some of those details I easily overlook...
However, when I create a category, 'use default' is still the only option given when choosing the template. I cleared the browser cache and even tried it in a different browser. Still the same result.
You really have to care about the path, as William has written :
website_root_directory/templates/YourJoomlaTemplate/html/com_k2/templates/my_k2_template
In that folder, there should be the files from the 'Default' K2 template folder.
Olivier
Brian Greene said:Thank you for helping me correct that, some of those details I easily overlook...
However, when I create a category, 'use default' is still the only option given when choosing the template. I cleared the browser cache and even tried it in a different browser. Still the same result.
Please Log in or Create an account to join the conversation.
- John Horrocks
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
14 years 9 months ago #86944
by John Horrocks
Replied by John Horrocks on topic sub templates, cannot get it to work
Thanks everyone for all the help! I have almost got this!
So far I have made 2 simple changes. I copied everything in the folder /components/com_k2/templates/default and pasted it into folder /templates/jp_interactive_j1.5/html/com_k2/templates, then I simply renamed the new 'default' folder to 'restaurant_menus.'
I then went into the K2 back end again, created a new category, and sure enough I am able to select 'restaurant_menus' for the template!! First problem DOWN!
Now when I try to edit the file .../restaurant_menus/category_item.php, no changes occur. It remains the same as the default template category items view when I view it in the browser. I also cleared the cache before I checked it in the browser.
Any advice would be much appreciated!
So far I have made 2 simple changes. I copied everything in the folder /components/com_k2/templates/default and pasted it into folder /templates/jp_interactive_j1.5/html/com_k2/templates, then I simply renamed the new 'default' folder to 'restaurant_menus.'
I then went into the K2 back end again, created a new category, and sure enough I am able to select 'restaurant_menus' for the template!! First problem DOWN!
Now when I try to edit the file .../restaurant_menus/category_item.php, no changes occur. It remains the same as the default template category items view when I view it in the browser. I also cleared the cache before I checked it in the browser.
Any advice would be much appreciated!
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 9 months ago #86945
by Simon Wells
Replied by Simon Wells on topic sub templates, cannot get it to work
Are you sure you want to be editing the category_item.php.
What are you trying to edit?
Are you on the right page?
Simon
K2 Support
What are you trying to edit?
Are you on the right page?
Simon
K2 Support
Please Log in or Create an account to join the conversation.