Keyword

Category template not being picked up by Archive module

More
13 years 6 months ago #87825 by Jose Ramon
yes, you're right.

I am new with K2.

When finish my project, I will copy the files in JOOMLA/templates/YOUR TEMPLATE/HTML/com_k2  and will restore the original "default".

Thanks.
Brent Friar said:

That does work, but there is a problem with doing it that way. First, you should never edit the files in default. K2 is designed to support multiple sub-templates. Any time you want a new look for any K2 page, you make a copy of default then name it something else. You put that copy in JOOMLA/templates/YOUR TEMPLATE/HTML/com_k2. You will then be able to see the new folder in the category subtemplate selection. This allows you to keep adding new styles to use for each category.

 

The generic.php file should also have the same ability, but for some reason it does not. In the K2 tools module there is actually a bit of code that selects the generic file. I have tried replacing that with the code used to select custom subtemplates but it does not work. Like I said, I didn't have time to figure out why so I just created a work around. If it works for you, go with it, just know that you can have multiple subtemplate files for basically everything else.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #87826 by Nate
Copy the following file:
/components/com_k2/templates/generic.php

Paste the copy to:
/templates/YOUR_TEMPLATE/html/com_k2/templates/generic.php

Modify the copied file.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum