There are several theme_ functions in the gallery module that are possible candidates to be extracted into .tpl template files. Most of the theme_ functions are actually trivial, but still, people probably want to customize image/grid blocks, the search results, etc.

Anyone willing to help with conversion or at least to nominate .tpl candidates is welcome to take a start.

CommentFileSizeAuthor
#2 gallery_tpl.patch5.07 KBkiz_0987
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kiz_0987’s picture

Perhaps theme_gallery_block_image_block, theme_gallery_block_grid_block & theme_gallery_search_item would be good first options. The others seem to all be admin theme functions.

theme_gallery_block_image_block is so simple that a template does not seem to provide much benefit in terms of ease of use, but the other 2 are a bit more complex.

I'm still trying to get my head around all of the new tpl changes. I'm also concerned about the comment that tpls are 5 times slower than functions.

kiz_0987’s picture

Assigned: Unassigned » kiz_0987
Status: Active » Needs work
FileSize
5.07 KB

Here's a first cut at image/grid block templates. I'm still not totally sure I'm doing everything right, but it's a start.

Note that zebra on grid rows is not working.

profix898’s picture

Do you plan to complete this patch or do you want me to take over?

kiz_0987’s picture

Status: Needs work » Fixed

Committed updated tpl functions for image blocks. I have not tpl'd the search page as the theming for that page needs some work I think.

@profix898: The fix for the wrapping of G2.3 <div class="block-imageblock-ImageBlock"> is imperfect and you may want to take a look. Also this will need to be added into the D5 code once we are supporting Gallery2.3.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.