Keyword

Each Template with own css

  • troponin
  • troponin's Avatar Topic Author
  • Offline
  • Platinum Member
More
14 years 7 months ago #72904 by troponin
Each Template with own css was created by troponin
Hey,

can someone tell me how it is possible to set every template his own css file ?
I need different css format for different templates, but the css isn't linked in the template.

I have allready read the Templating Tut here.

e.g. I would like to have different background colors in the templates.

Hope someone can help. thx
Attachments:

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

  • olsen
  • olsen's Avatar
  • Offline
  • Elite Member
  • Joomla and K2 Freelancer
More
14 years 7 months ago #72905 by olsen
Replied by olsen on topic Each Template with own css
what you can do by now, its to add on the style.css your new settings, at least until we find the way to create separate css files for each template.

Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details

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

More
14 years 7 months ago #72906 by Valdis
Replied by Valdis on topic Each Template with own css
For now it's possible to add css for each template using something like this inside template php files (like item.php and such):
$doc =& JFactory::getDocument();
$doc->addStyleSheet( 'www.example.com/css/mystylesheet.css' );

After that in the header of loaded html document for single k2 item you will find appropriate link tag referring to requested stylesheet.

IMHO sufficient to attach different additional css to each customized k2 template ;)

Regards,
Valdis

olsen said:what you can do by now, its to add on the style.css your new settings, at least until we find the way to create separate css files for each template.

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

  • troponin
  • troponin's Avatar Topic Author
  • Offline
  • Platinum Member
More
14 years 7 months ago #72907 by troponin
Replied by troponin on topic Each Template with own css
thx - if I do this do I have do comment the other style.css out ?

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

More
14 years 7 months ago #72908 by Valdis
Replied by Valdis on topic Each Template with own css
Usually no; unless You really are overriding everything and just don't want to load one extra unused css.

Troponin said:thx - if I do this do I have do comment the other style.css out ?

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


Powered by Kunena Forum