- Posts: 46
COMMUNITY FORUM
K2 subtemplate not applying correct classes
- Andrea
- Topic Author
- Offline
- Senior Member
Less
More
4 years 11 months ago #173907
by Andrea
K2 subtemplate not applying correct classes was created by Andrea
Hi, i recently created a new k2 subtemplate in order to test a new way of showing item in category lists, copying the folder of another templates in "/public_html/templates/MYTEMPLATE/html/com_k2/templates".
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
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
Less
More
- Posts: 6218
4 years 11 months ago #173912
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic K2 subtemplate not applying correct classes
The paths are probably wrong.
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
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
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrea
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 46
4 years 11 months ago - 4 years 11 months ago #173917
by Andrea
Replied by Andrea on topic K2 subtemplate not applying correct classes
This is what i got (image below): all the custom templates we already use for K2 are stored here and work as expected...
The subtemplate i'm willing to work on is "category-italia-new".
Thanks in advance for your kind support, best regards
Andrea
The subtemplate i'm willing to work on is "category-italia-new".
Thanks in advance for your kind support, best regards
Andrea
Last edit: 4 years 11 months ago by Andrea.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
4 years 11 months ago #173920
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic K2 subtemplate not applying correct classes
1) You should move all subfolders of /templates/MYTEMPLATE/html/com_k2/templates/ into /templates/MYTEMPLATE/html/com_k2/ to be future-proof.
2) Make sure the category template setting is not getting over-written by a menu.
2) Make sure the category template setting is not getting over-written by a menu.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrea
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 46
4 years 11 months ago #173922
by Andrea
Replied by Andrea on topic K2 subtemplate not applying correct classes
Hi Fotis,
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
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
Less
More
- Posts: 6218
4 years 11 months ago #173923
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic K2 subtemplate not applying correct classes
Check your category settings ;)
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.
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.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrea
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 46
4 years 11 months ago #173924
by Andrea
Replied by Andrea on topic K2 subtemplate not applying correct classes
Hi Fotis,
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...
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
Less
More
- Posts: 6218
4 years 11 months ago #173925
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic K2 subtemplate not applying correct classes
The display of that element is controlled by either the category, item or menu options. Also check if the category these items belong to inherit their parameters from another category. In that case, the parameters from the 2nd category would prevail.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrea
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 46
4 years 11 months ago #173927
by Andrea
Replied by Andrea on topic K2 subtemplate not applying correct classes
Hi Fotis,
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.
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
Less
More
- Posts: 6218
4 years 11 months ago #173928
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic K2 subtemplate not applying correct classes
I'm referring to K2 menu items. You can select a K2 sub-template there.
I'm NOT referring to Joomla template assignment, that's a different thing.
In any case, it's a matter of parameter inheritance.
I'm NOT referring to Joomla template assignment, that's a different thing.
In any case, it's a matter of parameter inheritance.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.