- Posts: 147
COMMUNITY FORUM
Customizing templates: path to background images
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
It has to do with the folder structure in components/com_k2/templates versus the paths in the CSS files for example:
a.facebook {background-image: url(../images/social/facebook.png);}
i e the path in the CSS refers to folder parallel to components/com_k2/templates:
com_k2 -
- css
- images
- templates
- etc
But the styles are lost when creating a customized template in:
templates/MY_TEMPLATE/html/com_k2/templates/MY_CUSTOMIZED_TEMPLATE
Why is this a problem? Just change the paths and it will work, eyh????
The problem is that it's so easy to miss any of all the CSS backgrounds in k2.css. Website creation is very much about standardized structures. I tried some different apporaches to this problem, two ways are to put the image folders in either the templates/MY_TEMPLATE/images folder or in the root/images folder and it works, but it will be a bit tricky to match everything the next time K2 is updated.
Has anyone solved this issue in a practical way?
Rgds
--Mats
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
There is a further guide, based on the one you mentioned above, but with a bit more information.
Check out this page.
There is also this page reviewing and excellent plugin that is being used on K2Joom.com.
I always copy the images folder from the K2 Default into the joomla template /html . . . etc.
Using these steps, I run several custom micro themes within the Joomla Templates, the assign them to different categories. This allows no only a difference in tersm of the php structure, but also call differnet images and colors etc.
Hope that helps.
K2Joom.com
Please Log in or Create an account to join the conversation.
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
- Posts: 147
Thanks!
Please Log in or Create an account to join the conversation.
- TOTALLNET
-
- Offline
- New Member
- Posts: 15
I had customized my K2 too but i missed the images ...
I copied the images folders to :
- my template/html/com_k2/images
- my template/images
- root/images
and nothing...
Default item who had not customized works fines... what i miss ??
Ps.. im using OneCCSperK2 ...
Thanks in advance
Please Log in or Create an account to join the conversation.
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
- Posts: 147
Rgds
TOTALLNet - Conveniencia Digital said:Hi...I had customized my K2 too but i missed the images ...I copied the images folders to :- my template/html/com_k2/images- my template/images- root/imagesand nothing...Default item who had not customized works fines... what i miss ??Ps.. im using OneCCSperK2 ...Thanks in advance
Please Log in or Create an account to join the conversation.
- TOTALLNET
-
- Offline
- New Member
- Posts: 15
I read and did all the instructions in Simon's topic ..
All my K2 templates customized are in MYTEMPLATE/html/com_k2 folders...
But the images dont appear ...
By the way, thanks for your response...
Mats Arvendal said:Hi, did you put the K2 template files in a subfolder html in you customized template folder? What I mean is the importance of having all structure in consistency. My problems were solved when I payed special attention to that. And I also checked Simon's links.
Rgds
TOTALLNet - Conveniencia Digital said:Hi...I had customized my K2 too but i missed the images ...I copied the images folders to :- my template/html/com_k2/images- my template/images- root/imagesand nothing...Default item who had not customized works fines... what i miss ??Ps.. im using OneCCSperK2 ...Thanks in advance
Please Log in or Create an account to join the conversation.
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
- Posts: 147
Rgds
TOTALLNet - Conveniencia Digital said:ThanksI read and did all the instructions in Simon's topic ..All my K2 templates customized are in MYTEMPLATE/html/com_k2 folders...But the images dont appear ...By the way, thanks for your response...Mats Arvendal said:Hi, did you put the K2 template files in a subfolder html in you customized template folder? What I mean is the importance of having all structure in consistency. My problems were solved when I payed special attention to that. And I also checked Simon's links.RgdsTOTALLNet - Conveniencia Digital said:Hi...I had customized my K2 too but i missed the images ...I copied the images folders to :- my template/html/com_k2/images- my template/images- root/imagesand nothing...Default item who had not customized works fines... what i miss ??Ps.. im using OneCCSperK2 ...Thanks in advance
Please Log in or Create an account to join the conversation.
- TOTALLNET
-
- Offline
- New Member
- Posts: 15
The structure is :
mytemplate/html/com_k2/
/templates/totallnet/item.php
/templates/totallnet/item_comments_form.php
/templates/totallnet/latest.php
/templates/totallnet/latest_item.php
/templates/totallnet/category.php
/templates/totallnet/category_item.php
/templates/totallnet/category_item_links.php
/templates/totallnet/images/fugue/
/templates/totallnet/images/placeholder/
/templates/totallnet/images/social/
/templates/totallnet/images/system/
Off course all the images are in their respective folders...
The changed that i had made :
In item.php we need that the video appear into the text field and not after text field... so... copy the lines above and put after :
Its the wrong way ??? .. may i do somothing or everything wrong ??
Ps im not developer.. off course you see my inexperience .. but im a novice joomlas enthusiastics
Please Log in or Create an account to join the conversation.
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
- Posts: 147
your structure looks like mine except:
mytemplate/html/com_k2/templates/totallnet/images/placeholder/
mytemplate/html/com_k2/templates/totallnet/images/social/
mytemplate/html/com_k2/templates/totallnet/images/system/
for which I use:
mytemplate/images/placeholder/
mytemplate/images/social/
mytemplate/images/system/
Perhaps this is something to investigate?
Rgds
Please Log in or Create an account to join the conversation.
- TOTALLNET
-
- Offline
- New Member
- Posts: 15
I copied the images folders to :
- my template/html/com_k2/images
- my template/images
- root/images
I tried several ways ...
the only difference is that i changed the movies output to "after text full form"
the website is still over development...but the url in question is www.unione.art.br/portal/index.php?option=com_k2&view=item&id=35:swu-entrevista-juliana-wallauer&Itemid=23
Others K2 templates is "still" OK ...
Please Log in or Create an account to join the conversation.
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
- Posts: 147
Rgds
Please Log in or Create an account to join the conversation.
- TOTALLNET
-
- Offline
- New Member
- Posts: 15
the problem is :
default path
a.facebook {background-image: url(../images/social/facebook.png);}
the images folders in K2 customized templates are in the second level so...
a.facebook {background-image: url(../../images/social/facebook.png);}
Please Log in or Create an account to join the conversation.
- Mats Arvendal
-
Topic Author
- Offline
- Premium Member
- Posts: 147
Rgds
Please Log in or Create an account to join the conversation.