Keyword

Customizing templates: path to background images

  • Mats Arvendal
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 7 months ago #79056 by Mats Arvendal
I noticed when I created customized templates (according to the instructions in community.getk2.org/notes/Templating_in_K2) for K2 v2.2 that the background images for social bookmarking, font resizer etc disappeared.

 

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.

More
14 years 7 months ago #79057 by Simon Wells
Replied by Simon Wells on topic Customizing templates: path to background images
Yes, this has been discussed many times.
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
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 7 months ago #79058 by Mats Arvendal
Replied by Mats Arvendal on topic Customizing templates: path to background images
Yeah, it gives me more info on how to handle the customized templates in a more efficient way.
Thanks!

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

More
13 years 10 months ago #79059 by TOTALLNET
Replied by TOTALLNET on topic Customizing templates: path to background images
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/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
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 10 months ago #79060 by Mats Arvendal
Replied by Mats Arvendal on topic Customizing templates: path to background images
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.

More
13 years 10 months ago #79061 by TOTALLNET
Replied by TOTALLNET on topic Customizing templates: path to background images
Thanks

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
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 10 months ago #79062 by Mats Arvendal
Replied by Mats Arvendal on topic Customizing templates: path to background images
It may be some problems with the paths,though. Have you checked the codes via firebug or some similar component?

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.

More
13 years 10 months ago #79063 by TOTALLNET
Replied by TOTALLNET on topic Customizing templates: path to background images
ok .. i will tell you what i did :

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
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 10 months ago #79064 by Mats Arvendal
Replied by Mats Arvendal on topic Customizing templates: path to background images
Hi,
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.

More
13 years 10 months ago #79065 by TOTALLNET
Replied by TOTALLNET on topic Customizing templates: path to background images
In my first reply .. i said :

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.


Powered by Kunena Forum