I'll be on IRC until I leave work if you have some more questions.
Sean On 1/25/07, Loren Johnson <[EMAIL PROTECTED]> wrote:
Well, that sorta answers the question. I need to look web standards and js a bit. I definately want to manage the js file as a file and not as a page or snippet. I also think I'll really need it to load within <head></head> but that's a web standards question. If it still works and validates and I can load the file in as body then that's great. The file loads everything-up on window.onload anyhow so it won't even try to load until after the HTML is done. I did see those methods as part of the Admin template and setup earlier and will be using themt (sorry don't have it to refer at my fingertips right now either) for cleaning-up 2nd level navigation within a couple of admin applets. Ramble ramble. Thanks, I'll see what I find out about .js file loading in the <body>. Loren Johnson www.fn-group.com On Jan 25, 2007, at 12:16 PM, Sean Cribbs wrote: 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 _______________________________________________ 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
