Gallery:外观主题:如何编辑一个现有的外观主题
If you'd prefer to make minor changes to an existing theme rather than creating a new one, follow these steps. By doing so you'll ensure that when you upgrade your Gallery, your theme edits won't be overwritten. Gallery's theme system will load style sheet and template files from folders named 'local' instead of the theme's core files. Just make a 'local' folder then make a copy of the file you wish to edit. The following steps are specific to the matrix theme—just replace matrix with your chosen theme (siriux, floatrix, carbon, etc.).
Edit an Existing Theme's CSS File
- In your chosen theme's folder (ex. themes/matrix/), create a new folder named 'local', not to be confused with locale which contains language translation files.
- Make a copy of theme.css and move it to the 'local' folder
- Edit themes/matrix/local/theme.css
Edit an Existing Theme's Template Files
- In your chosen theme's folder (ex. themes/matrix/templates), create a new folder named 'local'
- Make a copy of the template you wish to edit in the 'local' folder (theme.tpl, album.tpl, photo.tpl, etc.)
- Edit your copied template files in themes/matrix/templates/local/
- See: Editing Templates
Important: If you made some changes, but you still can't see the change:
Be sure to flush caches (under siteadmin/maintenance) and/or turn off page level caching (under siteadmin/performance) before you try debugging deeper.