I have read the docs and already made couple custom templates with K2 but today noticed some inconsistency. Using 3in1 K2 2.5 Joomla 1.5.24
Let say you are overriding k2/templates/default , if you use your K2 template name as default everything works fine , you can override each K2 requested page and also do override trough
templates/template_name/html/com_k2 , so this is all nice and clear .
Now , lest say you don't want to name your template as default , you want it as Bookstore so that users can switch the templates in K2 admin
so the steps for joomla template override
1. Create Bookstore folder in templates/template_name/html/com_k2/templates folder
now we have
templates/template_name/html/com_k2/templates/Bookstore
(Also tested with templates/template_name/html/com_k2/Bookstore )
2.move files and folders from ,
components/com_k2/templates/
3. rename default folder name to Bookstore.
4. assign Bookstore to your main K2 category( make sure other cats inherit params from this one)
looks kinda ok right?
Well, now remove item title from
templates/template_name/html/com_k2/templates/Bookstore/tags.php
Go to your joomla menu and create new K2 tag
funny thing here is that I MUST choose Bookstore template again otherwise I am reset to default ,
OK did that , moving on , I have 4 tags and option lets me choose only 1 . fine , lets see what happens.
now , go to frontend , click on the new menu created , your template override works , you will see items without title ,
OK , stay right there , go inside the item , and find item tags , click on ANOTHER tag , not the one you made menu for ,
bum , override resets to default ,
even worse is if you change menu item type to Item , there is no option to select template for it , all you can choose is item itself and with that your are reset to default automatically and your Bookstore custom layout will not work.
So please , let me know if I am missing a setting or this is how it is and I should use default and stop messing with template names,
what I did notice is if I have both folders , default and Bookstore in
templates/template_name/html/com_k2/templates/
everything works , but now I am not sure which one has precedence
Let say you are overriding k2/templates/default , if you use your K2 template name as default everything works fine , you can override each K2 requested page and also do override trough
templates/template_name/html/com_k2 , so this is all nice and clear .
Now , lest say you don't want to name your template as default , you want it as Bookstore so that users can switch the templates in K2 admin
so the steps for joomla template override
1. Create Bookstore folder in templates/template_name/html/com_k2/templates folder
now we have
templates/template_name/html/com_k2/templates/Bookstore
(Also tested with templates/template_name/html/com_k2/Bookstore )
2.move files and folders from ,
components/com_k2/templates/
3. rename default folder name to Bookstore.
4. assign Bookstore to your main K2 category( make sure other cats inherit params from this one)
looks kinda ok right?
Well, now remove item title from
templates/template_name/html/com_k2/templates/Bookstore/tags.php
Go to your joomla menu and create new K2 tag
funny thing here is that I MUST choose Bookstore template again otherwise I am reset to default ,
OK did that , moving on , I have 4 tags and option lets me choose only 1 . fine , lets see what happens.
now , go to frontend , click on the new menu created , your template override works , you will see items without title ,
OK , stay right there , go inside the item , and find item tags , click on ANOTHER tag , not the one you made menu for ,
bum , override resets to default ,
even worse is if you change menu item type to Item , there is no option to select template for it , all you can choose is item itself and with that your are reset to default automatically and your Bookstore custom layout will not work.
So please , let me know if I am missing a setting or this is how it is and I should use default and stop messing with template names,
what I did notice is if I have both folders , default and Bookstore in
templates/template_name/html/com_k2/templates/
everything works , but now I am not sure which one has precedence