= Interface Customization using site.html This page collects useful snippets for inclusion in a project `site.html` file. A snippet should reside inside the standard root element of the file: {{{ #!xml }}} Ideally, snippets are accompanied by a short description. == Quicksearch for tickets only When no search filters are provided, Trac searches using all filters. This snippets adds a filter to the quicksearch that restricts searches to tickets only by default. More can of course be added by user after initial search: {{{ #!xml
${select('*|text()|comment()')}
}}} Explanation: It grabs the `
` inside the quicksearch form into a new div, adding any attributes of the old (though no attributes by default) and then inserts any content (elements, text and comments) that the old element had with the `${select()}` call. To this new (identical) div, a new `` element is added that provides a filter for ticket-only search. == Add licensing information when adding attachments If adding attachments to your Trac site requires people to agree to some licensing terms, you can add the terms of the license on the "Add attachments" page as follows: {{{#!xml

By submitting a file here, you accept that we can do whatever we want with it...

${select('*|comment()|text()')}
}}} Explanation: This matches the `
` containing the submit buttons, adds a paragraph with the text at that location, then reconstructs the matched `
` with its initial content and attributes. == Rename Roadmap header If your team would prefer to see a different title instead of Roadmap, add the following code to your site.html and restart the server. Don't forget to edit trac.ini to [TracNavigation change the link title]. {{{#!xml

Open Milestones

}}} == Replace footer If you want to change the default footer, this snippet strips out the current one and puts in my own. Tested with 1.0.1. {{{#!xml }}} ---- See also: TracInterfaceCustomization, SiteStyleCss