In my never-ending search for perfection I'm trying to set things up so that the date and time are displayed for every album in "layout" view, except the ones at the second level (I was going to say top level but I think there's only one album at the top level - the all-encompassing gallery-wide album). There's a way to check whether an item is album or a picture by checking whether it can contain other items, using the following type of code:
{if ($it.canContainChildren)}
...
{else}
...
Is there a similar way to check whether an album is at a particular level in the gallery structure? I was thinking of using either the keyword or the custom field feature but I can't find any documentation on how to check the contents of these fields. For instance, there's a way to check whether the summary field is filled up by using the following code:
{if isset($it.summary)}
...
{/if}
Where can I find documentation on how to access the other fields in an album?
Posts: 352
I also would like to know how to get the custom field values from within a template. Thanks.
Posts: 8601
see G2 customization guide, sticky topic in this forum for some basic info.
turn on debug output in config.php and reload.. you'll get a popup (if not blocked) showing all the data available to the template.
try putting
{g->callback type="customfield.LoadCustomFields" itemId=$theme.item.id}
in your template and see what new data becomes available.
Posts: 352
Thanks, that info combined with looking at the smarty cache was what I needed.
Posts: 352
I'm now trying to get the default album thumbnail size. I can't find a callback to retreive this information. It looks like ItemEditItem.inc gets this information by calling getDerivativeOperations. But I don't know how to call that function on the objects while inside a template. Any help would be appreciated. Thanks.