Ticket #2680 (closed defect: fixed)
Templates directory order for ClearSilver to read from when project index page was requested
| Reported by: | franetic@… | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | low | Milestone: | 0.9.4 |
| Component: | general | Version: | 0.9.3 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
You encourage people to make copy of the default templates, if you want to change something in the template code. I did, and I use the same filenames as the default ones. Now, if I request the project index page, it gets the template dir from the TRAC_ENV_INDEX_TEMPLATE (or TracEnvIndexTemplate), and adds to the hdf.loadpaths, but after the default-templates_dir.
CS loads e.g. the header.cs from the default-templates dir, and not from mine. :-( IMHO the default-templates dir should only serve the fallback puposes.
Might be useful to change the order, how it adds the template dirs to hdf.loadpaths in main.py in the send_project_index function:
From
req.hdf = HDFWrapper(loadpaths=[default_dir('templates'), tmpl_path])
To
req.hdf = HDFWrapper(loadpaths=[tmpl_path, default_dir('templates')])


