Custom Javascript/CSS file includes

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
mshaker
Posts: 19
Joined: Fri 20. Jun 2008, 11:13

Custom Javascript/CSS file includes

Post by mshaker »

Is there a way to include custom javascript (in addition to frontend.js) and/or CSS (in addition to frontend.css). I'd like to have a different .js file for each category when needed.
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Custom Javascript/CSS file includes

Post by juergen »

Hey, yes, in the NEWER Versions from the google code branch:


from Oliver:

Code: Select all

       /* Load my special Mootools script */
       $block['custom_htmlhead']['mootools.js']   = '  ';

       /* Load Mootools in newer releases */
       initMootools();

       /* Load My custom JavaScript */
       $block['custom_htmlhead']['my.js']      = '  ';
      
       /* Load some other positions */
       $block['custom_htmlhead']['favicon1']      = '  ';
       $block['custom_htmlhead']['favicon2']      = '  ';

       /* IE <=6 Style Hack */
       $block['custom_htmlhead']['IEhack']  = '  ';     

       /* Hm I want to overwrite some default CSS */
       $block['custom_htmlhead']['mycss']  = '  ';
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Custom Javascript/CSS file includes

Post by Oliver Georgi »

Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Custom Javascript/CSS file includes

Post by Jensensen »

An answer which has a closer relation to the question can be found here:
[x]
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Post Reply