Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | gallery_tpl.patch | 5.07 KB | kiz_0987 |
Comments
Comment #1
kiz_0987 CreditAttribution: kiz_0987 commentedPerhaps 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.
Comment #2
kiz_0987 CreditAttribution: kiz_0987 commentedHere'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.
Comment #3
profix898 CreditAttribution: profix898 commentedDo you plan to complete this patch or do you want me to take over?
Comment #4
kiz_0987 CreditAttribution: kiz_0987 commentedCommitted 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.Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.