On 18 October 2013 11:49, Ryan Ollos <[email protected]> wrote: >> When I was using Trac I tried customizing the template using: >> http://trac.edgewall.org/wiki/TracInterfaceCustomization >> >> At the end however, I ended up copying theme.html and rewriting it >> entirely. >> By placing the copy in my Trac environment "templates" directory, it >> seems to work automagically. >> >> With Bloodhound it seems that the main template is in >> bloodhound_theme.html but I haven't found how to supersede it ? >> > > I did some quick testing and the same mechanism seems to work fine. You > should be able to copy `bloodhound_theme.html` into the environment's > templates directory, and that copy of the template will supersede the > version installed in the package templates directory. You can then edit > `bloodhound_theme.html` however you'd like. However, note the warning about > taking this approach: > http://trac.edgewall.org/wiki/TracInterfaceCustomization#ProjectTemplates > > I believe it works this way for any template because of the order of the > template directory paths: > http://trac.edgewall.org/browser/tags/trac-1.0.1/trac/web/chrome.py?marks=625-627#L616 >
Oh I found the mistake: I have tried putting theme.html in templates but it didn't work. So I ended up modifying bloodhound_theme.html inplace but I haven't thought about putting bloodhound_theme.html in templates (*slap forehead*). Thanks ! >> Basically I would like to integrate Bloodhound in my main site, so I have >> to: >> - add a top navigation bar: allowing to switch between different >> part of the website >> - customize a little the navigation bar used to navigate in >> Bloodhound (Wiki/Source/Tickets): in order to have a consistent >> approach to navigation in my website. >> - move around the Search/New ticket boxes >> - move around the Login/Help/Guide/Preferences >> >> For the moment I am replacing completely the original >> bloodhound_theme.html and it works but I am breaking the layout/color. >> I haven't yet check the css, but it seems that if you insert something >> before the main body container, it breaks the layout. That makes me >> wonder if there is a positional instructions in the CSS somewhere. >> >> Can someone advise me on how to proceed to have a reliable and DRY >> approach ? >> >> It seems that my need seems generic enough and there is no wiki page >> on the subject, so maybe I can help writing one ? >> > > TracInterfaceCustomization discusses the preferred approach of using > site.html for customizations like the one you describe. I'm not sure about > the CSS issue you are experiencing. The way it works force me to completely rewrite the HTML: it is quite difficult to just supersede one part. But well the maintenance is not so difficult, so I guess it doesn't matter. For the CSS issue, I just insert a navbar just after the <body> and it seems to break the layout. I will send an example this evening. Thanks !
