- Posts: 567
COMMUNITY FORUM
'One css per k2 template' plugin
- Jiliko.net
-
Topic Author
- Offline
- Platinum Member
Your css means the background readMore image is located in K2_custom_template_dir/images/system/readmore.png.
Is it right ?
Olivier
Rob Molenaar said:See my 2 images. 1st Image is the html code of the read more in the category_item.html
2nd Image is the code of the readmore from mytmpl_style.css
Please Log in or Create an account to join the conversation.
- robm
-
- Offline
- Senior Member
- Posts: 74
No my images are still in the \components\com_k2\images\system\ folder
But also when I try to move the image to \templates\my_template\html\com_k2\templates\my_k2tmpl\images\system it also not working
Look like a wrong path but strange is that Firefox is ok... Also when I use Firebug the link to the image is ok and going to the \components\com_k2\images\system\ folder
Please Log in or Create an account to join the conversation.
- robm
-
- Offline
- Senior Member
- Posts: 74
Some double css. 1 from k2.css and 1 from my new template css file.
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Simon
K2Joom.com
Rob Molenaar said:When I look into the code with the IE developer tool I see something strange. Some double css. 1 from k2.css and 1 from my new template css file.
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
Topic Author
- Offline
- Platinum Member
- Posts: 567
What i use to do is to copy the k2.css original file as my custom template file, customize my css and disable k2.css original file.
Olivier
K2Joom said:This is normal, unless you disable the k2.css and just rely on the k2 template css.
Simon
K2Joom.com
Rob Molenaar said:When I look into the code with the IE developer tool I see something strange. Some double css. 1 from k2.css and 1 from my new template css file.
Please Log in or Create an account to join the conversation.
- robm
-
- Offline
- Senior Member
- Posts: 74
Could you please tell me your url link to your readmore button? Because when I type the full url address to my readmore button url(http://127.0.0.1/mywebsite/images/readmore.png) instead of url(..images/readmore.png) it is also working.
Please Log in or Create an account to join the conversation.
- Eric Lagarda
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.
- robm
-
- Offline
- Senior Member
- Posts: 74
I reallt don't know why but who cares... I got it worki......... O no....
It looks like all images are not showing in css.
So also the stars for voting are missing.
Its driving me crazy so I think I have to throw this plugin away. Perhaps I'm doing something wrong..
Rob Molenaar said:Ok I've done what you told. I gave k2.css a different name to disable it. But still no readmore button.Could you please tell me your url link to your readmore button? Because when I type the full url address to my readmore button url(http://127.0.0.1/mywebsite/images/readmore.png) instead of url(..images/readmore.png) it is also working.
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
Topic Author
- Offline
- Platinum Member
- Posts: 567
My last post is incorrect. I do not copy the k2 orginal css file as a custom css template file.
What i do is creating a custom css file and copy the k2 css code i want to override. If you copy the k2.css file in another location, all the urls for background images won't work anymore. Excepted if you also copy the k2 core images directory under your template.
Sorry for those who have followed these bad instructions.
Olivier
Please Log in or Create an account to join the conversation.
- robm
-
- Offline
- Senior Member
- Posts: 74
Olivier Nolbert said:Hi all,My last post is incorrect. I do not copy the k2 orginal css file as a custom css template file.What i do is creating a custom css file and copy the k2 css code i want to override. If you copy the k2.css file in another location, all the urls for background images won't work anymore. Excepted if you also copy the k2 core images directory under your template.Sorry for those who have followed these bad instructions.Olivier
Please Log in or Create an account to join the conversation.
- mike cartwright
-
- Offline
- Junior Member
- Posts: 20
What am I doing wrong?
Please Log in or Create an account to join the conversation.
- robm
-
- Offline
- Senior Member
- Posts: 74
What I did is:
1. Copy the file k2.css and paste it in the templates/html/com_k2/myTemplate/
2. Rename the file into myTemplate_style.css
3. Delete everything in this file.
Now if you want to make the Item Title font smaller;
4. As you can see in Firebug the Item Title is "div.catItemHeader h3.catItemTitle"
So add for example:
div.catItemHeader h3.catItemTitle{font-size:12px;}
into you new myTemplate_style.css (original font-size is 24px)
5 Save your file and refresh browser (clear cache?)
mike said:I cannot seem to get the plug in to work. I install it fine, then enable. I copied the k2.css file to the templates/html/com_k2/myTemplate/ folder. I expected to see the correct path appear when I inspected the element with firebug, but the path points to the k2.css file in the K2 component directory. I tried turning off the "enable default css" from the k2 component parameters screen, but then there is no k2 css at all.What am I doing wrong?
Please Log in or Create an account to join the conversation.
- mike cartwright
-
- Offline
- Junior Member
- Posts: 20
Rob Molenaar said:I struggled with this because the confusing description of this plugin.
What I did is:
1. Copy the file k2.css and paste it in the templates/html/com_k2/myTemplate/
2. Rename the file into myTemplate_style.css
3. Delete everything in this file.
Now if you want to make the Item Title font smaller;
4. As you can see in Firebug the Item Title is "div.catItemHeader h3.catItemTitle"
So add for example:
div.catItemHeader h3.catItemTitle{font-size:12px;}
into you new myTemplate_style.css (original font-size is 24px)
5 Save your file and refresh browser (clear cache?)
mike said:I cannot seem to get the plug in to work. I install it fine, then enable. I copied the k2.css file to the templates/html/com_k2/myTemplate/ folder. I expected to see the correct path appear when I inspected the element with firebug, but the path points to the k2.css file in the K2 component directory. I tried turning off the "enable default css" from the k2 component parameters screen, but then there is no k2 css at all.What am I doing wrong?
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
Topic Author
- Offline
- Platinum Member
- Posts: 567
Please Log in or Create an account to join the conversation.
- August Paschalidis
-
- Offline
- New Member
- Posts: 17
In the directory "templates/ja_purity_ii/html/com_k2/templates/default" i have the file "ja_purity_ii_style.css". However I select as Layout template of category the default template, it is loaded the css from "components/com_k2/css/k2.css" and not the ja_purity_ii_style.css. The same happens on the pages showing the items of a specific tag. Why? Any idea?
Thanks
Please Log in or Create an account to join the conversation.
- Ubirajara
-
- Offline
- New Member
- Posts: 1
The information in the plugin configuration page basically says:
Create a folder structure in your Joomla template html folder as follows:
/templates/YOURJOOMLATEMPLATE/html/com_k2/templates/mytpl/
tip1: mytpl is the name of your K2 template
Inside that folder create a CCS file named:
/templates/YOURJOOMLATEMPLATE/html/com_k2/templates/mytpl/mytpl_style.css
tip2: The css file should be named adding "_style.css" to the name of your K2 template.
Ubirajara
diego said:Hello In the directory "templates/ja_purity_ii/html/com_k2/templates/default" i have the file "ja_purity_ii_style.css". However I select as Layout template of category the default template, it is loaded the css from "components/com_k2/css/k2.css" and not the ja_purity_ii_style.css. The same happens on the pages showing the items of a specific tag. Why? Any idea? Thanks
Please Log in or Create an account to join the conversation.
- Michael Bell
-
- Offline
- New Member
- Posts: 2
Thanks so much for creating this plugin. It seems to be exactly what I need but, I'm having some trouble getting it to work. I have installed version 1.2.5 and enabled the plugin.
- I've copied the /components/com_k2/templates folder to /templates/rt_panacea_j15/html/com_k2/
- In /templates/rt_panacea_j15/html/com_k2/templates/ I've created a new folder called test and have copied the contents of 'default' to this folder
- Also in the 'test' folder I have created a file called test_style.css and added following to hide the borders on the itemtoolbar:
div.itemToolbar {
border-bottom:0px dotted #CCCCCC;
border-top:0px dotted #CCCCCC;
margin:16px 0 0;
padding:2px 0;
}
- In the category the item belongs to I have assigned the 'test' template
- But, when I go to the page the changes aren't displayed
- I've checked the source code and the path /templates/rt_panacea_j15/html/com_k2/templates/test/test_style.css is not listed as an applied CSS
- I know the plug-in is working in some regards because if I change the plugin parameter 'keep k2 css' to 'No' then /components/com_k2/css/k2.css is removed from the list of applied CSS's.
Any idea as to why the onecssperk2 plugin isn't scanning my /templates/rt_panacea_j15/html/com_k2/templates folder for the template specific CSS files?
Thanks for your time and work!
Please Log in or Create an account to join the conversation.
- Michael Bell
-
- Offline
- New Member
- Posts: 2
Thanks anyway!
Please Log in or Create an account to join the conversation.
- Olivier Karfis
-
- Offline
- Elite Member
Not sure it this is a bug or if it has to do with my config. Using k2 2.4.1, lates sh404SEF and css4K2 version 1.2.5 with about 3 subtemplates. Works perfectly except in this weird scenario that I just noticed...
My newsletter service automatically adds tracking arguments to the URL so the URL gets tagged with things like mcid=alfakjljk9098 and if you click on the link, when you get to the k2 item, no k2 related css gets loaded at all (neither the default one or the sub-template's). Looking into it a bit more, I noticed that if I add any arguments to any of my URLs, the css gets screwed up...
FYI: All the plugin options are set to "No"
Live example:
www.frenchtoday.com/blog/virtual-tour-of-paris-9th-arrondiss...
vs.
www.frenchtoday.com/blog/virtual-tour-of-paris-9th-arrondiss...
AND
www.frenchtoday.com/audiobooks/une-semaine-a-paris-audiobook...
vs.
www.frenchtoday.com/audiobooks/une-semaine-a-paris-audiobook...
Weird no? Any ideas what the issue could be?
Merci,
--Olivier
Owner of www.FrenchToday.com - K2 fan and freelancer, runs the Joomla/K2 tip site: www.yanaku.com
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
Topic Author
- Offline
- Platinum Member
- Posts: 567
I've got an idea, i will check that for next monday with may be a 1.2.6.
Olivier
Please Log in or Create an account to join the conversation.