Problems with custom fields in album.tpl

chicagogigs

Joined: 2007-05-09
Posts: 1
Posted: Wed, 2007-05-09 19:35

I have three global custom fields. I need them to appear on album.tpl -- in other words, when the user clicks through the main gallery2 page to an album and sees the photos within that album.

I followed these instructions:
http://codex.gallery2.org/Gallery2:How_to_display_custom_fields_next_to_thumbnail

But nothing happens.

I added to theme.inc:
/* Get custom fields */
list ($ret, $children) = GalleryCoreApi::loadEntitiesById($childIds);
if ($ret) {
return array($ret, null);
}

list ($ret, $theme['customFieldValues']) =
CustomFieldHelper::fetchFieldValues($children, 'detail');
if ($ret) {
return array($ret, null);
}

I added to my album.tpl:
{* Show a child's custom fields *}
{if isset($theme.customFieldValues[$child.id])}
<ul>
{foreach from=$theme.customFieldValues[$child.id] key=name item=value}
<li>{$name}: {$value}</li>
{/foreach}
</ul>
{/if}

Any ideas? Running gallery2 from within Drupal 4.7. THANKS!