- Posts: 46
COMMUNITY FORUM
K2 subtemplate not applying correct classes
- Andrea
-
Topic Author
- Offline
- Senior Member
Then, in category.php, i changed the itemContainer and itemContainerLast to itemContainernew and itemContainerLastnew, but after assigning the new template to the test category i created (this one: verticalife.it/it/prova-category-italia-new ) the category still uses the "default" itemContainer.
What i'm getting wrong?
Thank you for your help, best regards
Andrea
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
You should use something like:
/public_html/templates/MYTEMPLATE/html/com_k2/default/
/public_html/templates/MYTEMPLATE/html/com_k2/new/
Learn more about K2 templating here:
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
The subtemplate i'm willing to work on is "category-italia-new".
Thanks in advance for your kind support, best regards
Andrea
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
2) Make sure the category template setting is not getting over-written by a menu.
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
thanks, i've managed to fix that problem, however now the items in the category don't show the readmore div (catItemReadMore), even though the original subtemplate i copied and used for these new modifications does (see this page: verticalife.it/it/viaggi-tour-grecia-outdoor).
Any ideas?
TY
Andrea
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
The new template may "carry" the view check and if that check is set to off, you won't see the "readmore" link as you said.
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
i've manually set the category parameters to look just like the one i copied it from, hence the readmore in "Item view option in category listing" is enabled, but to no avail.
I'm kinda confused atm...
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
thanks for your reply.
As stated before, the category the items belong to doesn't inherit its parameters from another one. From the menu item options, i can only select which Joomla! template should be used, not K2 subtemplate. I selected the one we're using for our website anyway.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
I'm NOT referring to Joomla template assignment, that's a different thing.
In any case, it's a matter of parameter inheritance.
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
if i change the template from the menu item options (which i wasn't even able to before, i don't know why, but the dropdown selector was gray and unclickable), the changes get lost once saved (it turns back to "default").
Any suggestions?
TY
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
not sure i've got that: what should the menu item link to, then?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
However, if you need to create a menu item pointing to multiple K2 categories, e.g. an "All News" menu item retrieving K2 content from multiple categories, when you select these multiple categories, the options that follow are enabled. This is to allow you to override different category settings in regards to the grid of items displayed. E.g. one category may show just 4 "primary" items in 1 column. Another one 8 "leading" items in 2 columns. And so on. When the additonal grid options are enabled in the menu item, you can create a new grid and basically "normalize" potentially different grid settings per category.
Please Log in or Create an account to join the conversation.
- Andrea
-
Topic Author
- Offline
- Senior Member
- Posts: 46
Even the fact that the readmore isn't showing is strange, as the "default" template clearly shows that it's set to be visible.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.