Are there docs about template variables and functions?

Hi there,

I’m just getting started learning how to create Omeka S themes. I have plenty of experience using PHP content management systems, but I’m new to Omeka S.

Is there anywhere in the docs which outlines what function are available, and what variables exist in the template scope?

For a bit of context, I’m creating a view to show item-sets belonging to another item-set (using the itemSetsTree module), but not the items belonging to those item-sets.

As I understand, I have to use view/omeka/site/item/browse.phtml and view/omeka/site/item-set/browse.phtml.

I can use this kind of thing:

<?php $nestedItemSets = $this->itemSetsTree()->getChildren($itemSet);
if (isset($nestedItemSets) && !empty($nestedItemSets)) : 
// show the nested item-sets
else:
 // show items
endif;

but how can I allow functions like $this->pagination(); to use $nestedItemSets instead of the $items global?

Hope this question makes sense, I’d be grateful for any pointers on learning about the template scope, variables, and functions.

Many thanks,
Tom

The basic problem here is that pagination is designed to work with what’s provided by the controller. So it only really paginates the “main” content of the page you’re using it on. Changing what it’s paginating over, that’s not really something that can be done in a theme.

You’re anticipating needing to paginate the sub-sets of a set you’re viewing? Normally I’d think of that as being an “all in one page” kind of situation. A “pagination” solution for something like this in just a theme I think would look like using JS/CSS to alter what’s visible.