On Jan 29, 7:21 pm, "Ted Gifford" <[EMAIL PROTECTED]> wrote: > Goal: use [inherit] to specify semi-global templates (and chrome?) for > several Trac projects. > Version: 0.11b1 > Platform: Windows > > Following the directions > athttp://trac.edgewall.org/wiki/TracInterfaceCustomization, I was able to get > a site/env template working, but placing site.html in the > inherit\templates_dir wouldn't work. I used ProcMon to see which files Trac > was looking for, and it turns out that in the inherit\templates_dir the file > must be named layout.html (should probably update the wiki, it > only mentions site.html).
That should work - i use it myself for heaps of projects sharing one site.html file located in the inherited templates_dir directory outside projects, and outside Trac source. However, note that the search path for templates is: project, then shared templates, then Trac (and plugins). So, if you have an empty site.html inside the project templates folder, that is what will be located and used. Remove this file it if exists, and it will find the [inherit]'ed site.html instead. > Now I need to place the chrome (css, images) someplace. I didn't find any > chrome setting for [inherit], nor any prefix besides 'common/' and 'site/'. > Yes, I could put it in some virtual directory in Apache, etc., > but I am hoping for something more integrated with the rest of Trac. Using the Apache config (or similar for other frontends) to point to a shared location is the way this needs to be done. Say you then configure your chrome to be at /chrome, you then use trac.ini/[trac]/ htdocs_location = /chrome to make Trac generate links to all 'common' resources to that location instead (instead of /trac/project/chrome/ common). There is also a very recent (week old?) trac-admin function to 'copystatic' that lets you copy all Trac resources from the .egg and into that directory on disk. That should make it easier to keep Trac resources in that directory in sync as you upgrade. :::simon https://www.coderesort.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
