> On 2011-11-15 at 12:04:06, Cooke, Mark wrote:
> > ...
> > However, trying to do things the "right way", I have so far
> > failed to get add_stylesheet (from trac.web.chrome) to work:
> > 
> >     add_stylesheet(req, req.href.chrome('/smtmt/magtest.css'))
> > Looking at the code, is it actually possible to get this to
> > work?  add_stylesheet seems to exclude plugins (or am I
> > mis-reading it)?
> 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Chris Nelson
> Sent: 15 November 2011 17:08
> To: [email protected]
> Subject: RE: [Trac] Use of add_stylesheet within plugin?
> 
> TracJSGanttChart does:
> 
>     def post_process_request(self, req, template, data, content_type):
>         add_script(req, 'tracjsgantt/jsgantt.js')
>         add_stylesheet(req, 'tracjsgantt/jsgantt.css')
>         add_stylesheet(req, 'tracjsgantt/tracjsgantt.css')
>         return template, data, content_type
> 
> And I see the results of the style sheets.
> -- 
> Christopher Nelson, Software Engineering Manager
> SIXNET - Solutions for Your Industrial Networking Challenges
> 331 Ushers Road, Ballston Lake, NY  12019
> Tel: +1.518.877.5173, Fax: +1.518.877.8346 www.sixnet.com 
>  
Hi Chris,

Thanks very much, changing mine from:

>     add_stylesheet(req, req.href.chrome('/smtmt/magtest.css'))

...to...

>     add_stylesheet(req, 'smtmt/magtest.css')

...fixed the references.  Cool.

~ mark c

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en.

Reply via email to