Edgewall Software
Modify

Opened 8 years ago

Closed 7 years ago

#4092 closed defect (duplicate)

site.html in environment templates is ignored

Reported by: Markus Tacker <m@…> Owned by: jonas
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords: verify
Cc:
Release Notes:
API Changes:

Description

With the new template engine I have to maintain a local copy of layout.html and all other templates in the environment even if I only change the CSS.

If the templates get updated I have to merge the changes by hand.

Please re-enable the old behaviour.

Attachments (0)

Change History (8)

comment:1 Changed 8 years ago by Noah Kantrowitz (coderanger) <coderanger@…>

You can see if the SysCss plugin still works on trunk.

comment:2 Changed 8 years ago by cboos

  • Resolution set to worksforme
  • Status changed from new to closed

Please check r3992, placing the CSS in the site.html file should do, no need to have your local copies of the templates.

comment:3 Changed 8 years ago by Markus Tacker <m@…>

  • Resolution worksforme deleted
  • Status changed from closed to reopened

If I have a <env>/templates/site.html it is ignored.

If I have a /usr/share/trac/templates/site.html it is included before the head tag, also the /usr/share/trac/templates/layout.html includes the site.html below the body tag.

Both is not a desired behaviour as the CSS has to be in the <head>.

comment:4 Changed 8 years ago by cmlenz

  • Resolution set to worksforme
  • Status changed from reopened to closed

Please see this mailing list thread. This stuff needs to be documented on TracInterfaceCustomization, but it works.

comment:5 Changed 8 years ago by Markus Tacker <m@…>

  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Summary changed from Have a single file for css changes like site_css.cs to site.html in environment templates is ignored
  • Type changed from enhancement to defect

Ok, thanks. It works globally but the environment specific site.html ist ignored.

comment:6 Changed 7 years ago by cboos

  • Keywords verify added
  • Milestone set to 0.11

comment:7 Changed 7 years ago by mgood

If you have templates of the same name in two places the first one found on the load path will be used, so you can't name both of them "site.html". The one in the environment should take precedence, though if it's been added while Trac is running the template loader will be using the "site.html" found in its template cache, which is why the project one is overridden. In order to use both a global template and a local one you can name the global one "site.html" and then put an xi:include tag in that file which refers to another filename you'll use within your projects as a local template.

comment:8 Changed 7 years ago by cboos

  • Milestone 0.11.1 deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

Duplicate of #3865. This should work now.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed The owner will remain jonas.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from jonas to the specified user.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.