Hi, I see there is a method of specifying an extra js file for inclusion in the head section of a certain .page file but I can''t seem to make it work. Is there an example anywhere? I tried: --- title: My Title in_menu: true sort_info: 3 js_file: http://static.delicious.com/js/playtagger.js --- Page content ..... Thanks Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20091221/b0714342/attachment.html>
> I see there is a method of specifying an extra js file for inclusion > in the head section of a certain .page file but I can''t seem to make > it work. Is there an example anywhere?This functionality is currently available only to webgen extension and cannot be directly used from a page file. However, this will be enabled in the next release. -- Thomas
Thanks Thomas, That''s great. Meanwhile I got around it using the following: Template file: <webgen:block name="header" notfound="ignore"/> Page file --- name:header <!-- allow inline play of mp3 files --> <script type="text/javascript" src="http://static.delicious.com/js/ playtagger.js"> </script> The only problem with the above is I had to put a space between the opening and closing script tags to prevent the markdown processor converting to a single empty script tag which breaks ie. Also, I don''t know why the preceding comment line line gets combined with the script line - there are 2 spaces on the end which I thought would cause a carriage return. Regards Martin
> Template file: > <webgen:block name="header" notfound="ignore"/> > Page file > --- name:header > <!-- allow inline play of mp3 files --> > <script type="text/javascript" src="http://static.delicious.com/js/ > playtagger.js"> </script> > > The only problem with the above is I had to put a space between the > opening and closing script tags to prevent the markdown processor > converting to a single empty script tag which breaks ie. > > Also, I don''t know why the preceding comment line line gets combined > with the script line - there are 2 spaces on the end which I thought > would cause a carriage return.If you just use HTML, you should turn off at least Markdown processing in the block or simply don''t use any content processor: --- name:header pipeline: -- Thomas