Ticket #4430 (closed task: invalid)
Plugins with CSS and chrome
| Reported by: | jc@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.10.3 |
| Severity: | normal | Keywords: | plugins css htdocs |
| Cc: |
Description
Plugins that comes with their own templates and css have a minor problem. The templates can be dropped into the site-templates folder. But the CSS cannot be dropped into the "static" folder you can reference in the trac.ini
[trac] htdocs_location = /layout
Would be great if the static resources of plugins can also be found in that location.
To solve that without modifying the trac code I added a small RewriteRule to the Apache. So all plugin static resources are under /layout/plugin/..
# REWRITE ANY CHROME REFERENCE TO A LOCAL FILE IF EXISTS
RewriteCond %{REQUEST_URI} ^/(\w+/)?chrome/(.*)
RewriteCond /path/to/webservers/htdocs/layout/%2 -f
RewriteRule ^(.*) /layout/%2 [PT]
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


