Keyword

Category Template the definitive solution required

  • Neil Boddie
  • Neil Boddie's Avatar Topic Author
  • Offline
  • Senior Member
More
12 years 6 months ago #64505 by Neil Boddie
Changes to category css setting for individual categories. I really need to get my head around this !!!!!!

According to
getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates

All I need to do is COPY THE CONTENTS of the folder /components/com_k2/templates/

and PASTE it into /templates/YOURJOOMLATEMPLATE/html/com_k2/

Now here's the problem using beez_20 there is NO /templates/beez_20/html/com_k2/

The /com_k2/ part does not exist inside the beez_20 template folder, so does that mean I have to copy the com_k2 folder and paste it inside the beez_20/html/ folder

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

More
12 years 6 months ago - 12 years 6 months ago #64506 by Aimery Marsily
Replied by Aimery Marsily on topic Re: Category Template the definitive solution required
Hi,

Yes you just have to :
1- Create inside template/beez_20/html a new folder named "com_k2"
2- Copy the content /components/com_k2/templates/
3- Paste the content in the new com_k2 folder of your beez template
4- In the files/folders that you have copy and paste, you'll see a folder nammed "default" simply change it for the name your want, "blog", "portflolio", "blablabl",...
Now you can customize all the file inside to have the display that your want for the category who use this new K2 template.

It's normal that Beez template doesn't have the com_k2 folder in the html folder, it's the system of overriding, they can't pre-add all the component/module and plugin... it's up to the developper to do so, and it's very simple when you know how to do ;-) That's your case now !

EDIT : You can create as much new template as you want, simply copy/paste the "default" forlder in the com_k2 of your template, one for "blog", one for "portfolio", etc

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

  • Neil Boddie
  • Neil Boddie's Avatar Topic Author
  • Offline
  • Senior Member
More
12 years 6 months ago #64507 by Neil Boddie
Ok thanks got that,

To make template css changes do I have to do the following;

Copy this: /components/com_k2/css/K2.css

Paste here: /templates/NEWTEMPLATENAME/css/

AND

Copy this: /components/com_k2/images

Paste here: /templates/NEWTEMPLATENAME/com_k2/

Will this now allow me to adjust css to make the template a permanent feature and allow changes to the category contents

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

  • Neil Boddie
  • Neil Boddie's Avatar Topic Author
  • Offline
  • Senior Member
More
12 years 6 months ago #64508 by Neil Boddie
Done this "Copy this: /components/com_k2/css/K2.css"

And Pasted here /templates/NEWTEMPLATENAME/css/

Now reads

templates/NEWTEMPLATENAME/css/K2.css

Did this
: 4- In the files/folders that you have copy and paste, you'll see a folder named "default" simply change it for the name your want, "blog", "portflolio", "blablabl",.

Am Able to do this
: Now you can customize all the file inside to have the display that your want for the category who use this new K2 template.

The only thing now is the Changes to the new template name on the category drop down menu are affecting the default as well which I dont want to happen.

What have I to do to separate the default selection and the new template name

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

More
12 years 6 months ago #64509 by Aimery Marsily
Replied by Aimery Marsily on topic Re: Category Template the definitive solution required
I'm not sure to understand if you did the real override procedure for your css... is it in the com_k2 override folder ? I mean in your template/html forlder ?

For your problem, if you change the template in the category assign to this category it will change only for This category. Do you do it from the category option ? Are you sure your other category do not have "Inherit parameter options from category" active ?

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

  • Neil Boddie
  • Neil Boddie's Avatar Topic Author
  • Offline
  • Senior Member
More
12 years 6 months ago - 12 years 6 months ago #64510 by Neil Boddie
Put the k2.css into beez_20/css ie: beez_20/css/k2.css

so it should go into beez-20/html/com_k2/newtemplate/css/k2.css

Have tried it all ways.

I have 2 categories each with 1 item inside, the categories are linked to separate menu selections.

The categories are not "Inheriting parameter options from category"
I have changed a background color on one category to check whether or not the template is working

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

More
12 years 6 months ago #64511 by william white
Replied by william white on topic Re: Category Template the definitive solution required
you should try css4k2 by jiliko.net avail there and also at k2joom.com
this is best for category specific css changes
the other method is best for site wide or across category changes

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

  • Neil Boddie
  • Neil Boddie's Avatar Topic Author
  • Offline
  • Senior Member
More
12 years 6 months ago #64512 by Neil Boddie
Hi Mushr00m picking up the new template within the category ok just need to find a way to link the css

Hi William, I plan to use this category template across various categories within the site and feel it should be quite easy to link the newtemplate nested within the html/com_2/ folder my problem is getting this css file to work.

I have tried to follow Fotis in his Templating with k2 tutorial but I find it hard to follow

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


Powered by Kunena Forum