Well, depends on whether you're talking about a Radiant layout or a Rails layout (i.e. in the views/layouts directory).
I might suggest when your extension activates, do some creation of the appropriate javascript files (if they don't exist), either in the public directory or as pages in Radiant. I have an idea brewing in the back of my head about copying extension assets on installation or on demand, but I'll probably want to talk it over with the rest of the team. Now if you're just talking about the admin interface, you can write Javascript code directly into the layout with the content_for block (I forget exactly what the section is, but look at app/views/admin/page/page.rhtml for an idea.) If you don't want it in your template, just put it in a partial where it's easier to update and render that partial inside the block. Did that answer your question? Sean On 1/25/07, Loren Johnson <[EMAIL PROTECTED]> wrote:
(Sean re. extension/lib autoloads -- thanks, that makes perfect sense though I'm still not sure I'm not crazy :) Is there any magic way to add a javascript file reference to the header of my site pages without doing the obvious and just dropping it in my Layout? I'm currently writing a large extension which will be js heavy and I'd like to make it as clean as possible. Install and go. I walked through the site_controller through parsing code this morning again and don't see anything there, so, I guess I'd like to just confirm that I didn't miss something. Thanks, Loren Johnson www.fn-group.com _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
