Notes on software development (Windows) and computer system administration.

2006-01-02

Menalto Gallery: Add a description next to each thumbnail in an album

I wanted to display my image description next to its thumbnail. I'm using the Classic theme.

Editing themes/classic/templates/album.tpl, I added an 'else' condition, changing this:

111 {if !empty($child.summary)}
112 <p class="giDescription">
113 {$child.summary|entitytruncate:256|markup}
114 </p>
115 {/if}

into this:

111 {if !empty($child.summary)}
112 <p class="giDescription">
113 {$child.summary|entitytruncate:256|markup}
114 </p>
115 {else if !empty($child.description)}
116 <p class="giDescription">
117 {$child.description|entitytruncate:512|markup}
118 </p>

119 {/if}

No comments: