Re: adding content to loaded macro

Tonico Strasser <[email protected]> Mon, 22 Mar 2004 21:33:49 +0100
Newsgroups gmane.comp.web.zope.plone.design
Message-ID <[email protected]>
chris hughes wrote:

>  > Hi all,
>  >
>  > I want to add some content to the javascript_head slot in
>  > main_template.pt, but I have no idea how to add content to a template
>  > that has already been loaded. I am building a portlet in a custom file
>  > system skin that needs to add a simple JS function to the HTML head.
>  > I've tried using a 'fill-slot' metal tag, but I get an error that this
>  > is only valid in the context of a 'use-macro tag. Obviously, if I
>  > implement the 'use-macro' tag, I will reload the entire macro and it
>  > will not be in the proper place. I obviously don't want to modify the 
>  > standard ecmascript files in the Plone skin. Can anybody help with
>  > this or offer a viable alternative?

If what you want is just a special JavaScript for this portlet you could 
add the script directly at the begining of your portlet code. The 
<script> tag is also allowed outside the <head>.

The script tag:
   <http://zvon.org/xxl/xhtmlReference/Output/Strict/el_script.html>

HTH

Tonico



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click