Gallery2:Themes:How to Edit an Existing Theme - Gallery Codex
Personal tools

Gallery2:Themes:How to Edit an Existing Theme

From Gallery Codex

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

  1. 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.
  2. Make a copy of theme.css and move it to the 'local' folder
  3. Edit themes/matrix/local/theme.css

Edit an Existing Theme's Template Files

  1. In your chosen theme's folder (ex. themes/matrix/templates), create a new folder named 'local'
  2. Make a copy of the template you wish to edit in the 'local' folder (theme.tpl, album.tpl, photo.tpl, etc.)
  3. Edit your copied template files in themes/matrix/templates/local/
  4. 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.