In a site that I am building, I have a similar requirement.  There are 
standard, site-wide css and javascript files that are included in my 
layout but I also have page specific javascript or css that occasionally 
needs added to the <head> section.

I solve it by including the following in my layout:
<html>
  <head>
     ...
    <r:if_content part="css"><r:content part="css"/></r:if_content>
    <r:if_content part="js"><r:content part="js"/></r:if_content>
    ...
  </head>
  ...

Then, in the appropriate pages, I create a new page part named "css" or 
"js" and put in my code in there.

The cool thing about this method is that I can declare inline javascript 
or css like:
    <style type="text/css" media="screen">
      #mainPic {display:none}
    </style>

or I can include an external file like:
    <script src="/my/special/script.js" type="text/javascript"></script>

-Chris

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to