Using a Theme Override (v2.3 question)

Kadina

Joined: 2006-04-26
Posts: 28
Posted: Wed, 2007-09-05 13:35

If it is inappropriate to ask questions on code that is still in development I apologize, but I am unclear on the proper etiquette in that regard. Please let me know if that is the case and I'll wait patiently until version 2.3 is released.

I've been looking forward to the ability to override module templates from within a theme but I cannot seem to get it to work properly. I am trying to override ItemInfo.tpl from within the matrix theme. I have followed the directions found in Gallery2:Editing Templates and saved a copy of ItemInfo.tpl in /gallery/themes/matrix/core_1/ItemInfo.tpl with my changes. After deleting the template cache and refreshing my browser page the changes do not show up. Do I need the "blocks" directory too? Am I doing something incorrectly or is this code just not finished yet? Thanks!


Gallery version = 2.3-svn core 1.2.21 r17036
API = Core 7.37, Module 3.8, Theme 2.6, Embed 1.2
PHP version = 5.2.2 cgi
Webserver = Apache/1.3.37 (Unix) DAV/1.0.3 mod_fastcgi/2.4.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysqli 4.1.21-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, LinkItemToolkit, Ffmpeg, ImageMagick
Acceleration = none/0, none/0
Operating system = Linux hero.nocdirect.com 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 26 14:30:58 EDT 2007 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-09-05 14:24

topic moved to the techzone forums. feel free to ask development related questions in the techzone forums. (customizing themes / templates is development)

- my guess is that you need to copy the file to themes/matrix/core_1/blocks/ItemInfo.tpl because ItemInfo.tpl is in the blocks/ subfolder of core/templates/.
- i suggest you clone the matrix theme and don't edit it directly.
- you need to reinstall or upgrade your theme before gallery looks for any overrides.
alternatively, i guess you can disable the template caching (site admin -> performance).

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Kadina

Joined: 2006-04-26
Posts: 28
Posted: Wed, 2007-09-05 17:06

I've cloned the matrix theme, put the .tpl in themes/matrixclone/core_1/blocks/, disabled template caching and reinstalled my theme and the changes are still not showing up. Any other suggestions?

Also, thanks for moving the topic as I wasn't sure where or even if I should post at all.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-09-05 17:19

i'll fix the docs.

the correct location is:
themes/matrix/templates/core_1/blocks/ItemInfo.tpl

within the templates/ folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Kadina

Joined: 2006-04-26
Posts: 28
Posted: Wed, 2007-09-05 17:25

Ahh, perfect. Its working now, thanks!