Skip to main content ↑ ↓
Adding custom style sheets Started by Wizard · · Read 7169 times 0 Members and 1 Guest are viewing this topic.

Adding custom style sheets

How to add custom style sheets to new theme ? Should I add it to index.template.php ? An example can help a lot.

Re: Adding custom style sheets

Reply #1 –

Yup, add it to the head section in index.template.php. For example before </head>
Code: [Copy]
<link rel="stylesheet" type="text/css" href="mystyle.css">


Re: Adding custom style sheets

Reply #2 –

Another way is to use loadCSSFile in the template_init function.
Bugs creator.
Features destroyer.
Template killer.


Re: Adding custom style sheets

Reply #4 –

And, you can even decide in which template load it, because you can just create a "template_NameOfTheTemplate" function and that is called automatically just after the file has been included (i.e. just after the call "loadTemplate('NameOfTheTemplate')").
Bugs creator.
Features destroyer.
Template killer.

Re: Adding custom style sheets

Reply #5 –

Well @emanuele always has a nice approach :D

Re: Adding custom style sheets

Reply #6 –

LOL

That's the result of messing with the code: you discover things that only very few people know. :P
Bugs creator.
Features destroyer.
Template killer.