Hi again Chris, i'm here to report success and a small redundancy with master.html
after patching tw (please consider patching tg instead / ticket 2010) all css and js resources got pasted into the page head correctly. the rows that try to do the same job are pasting the very same css and js again: <link py:for="css in tg_css" py:replace="ET(css.display())" /> <link py:for="js in tg_js_head" py:replace="ET(js.display())" /> these should probably not be allways generated. again, my case is tg1.1b1 with tw and genshi. best regards, alex On Sat, Oct 11, 2008 at 17:20, Christopher Arndt <[EMAIL PROTECTED]> wrote: > > alex bodnaru schrieb: >> On Sat, Oct 11, 2008 at 3:04 PM, Christopher Arndt <[EMAIL PROTECTED]> wrote: >>> alex bodnaru schrieb: >>>> i'm sure i'm not of the first to be stuck here, but i don't seem to >>>> understand what and where to import and invoke in order to have a >>>> widget javascript/css in the head of my rendered page. >>>> >>>> i'm currently trying to use tw.tabber and tw.jsqquery.autocomplete. >>>> please note, that the second widget is using and rendering some class >>>> object, however the javascript href is missing. >>> TG1 or TG2? >> 1 :) > > For TG1 the procedure is the same for TG widgets or for tw: > > 1) You page template must inherit from/include master.kid/html. > > 1.1) If you use Kid, master.kid must inherit from > view.templates.sitetemplate.kid > > Then you must either: > > a) Attach the JS/CSS widgets to a compound widget, which you return in > the dict from your controller. > > b) Put the JS/CSS widgets directly in the dict. > > c) Wrap them in a WidgetList instance and return this (1.1 only?). > > d) Name the JS/CSS widget *instance* in the tg.include_widgets config > setting. > > It's all explained here: > > http://docs.turbogears.org/1.0/WidgetsWithJSAndCSS#how-does-it-work > > > Chris > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

