<h1><?php 
echo $collectionTitle;
?>
</h1>

    <?php 
echo all_element_texts('collection');
?>

    <div id="collection-items">
        <h2><?php 
echo multicollections_link_to_items_in_collection(__('Items in the %s Collection', $collectionTitle), array('collection' => metadata('collection', 'id')));
?>
</h2>
        <?php 
if (multicollections_total_items_in_collection($collection) > 0) {
    ?>
            <?php 
    foreach (loop('items') as $item) {
        ?>
            <?php 
        $itemTitle = strip_formatting(metadata('item', array('Dublin Core', 'Title')));
        ?>
            <div class="item hentry">
                <h3><?php 
        echo link_to_item($itemTitle, array('class' => 'permalink'));
        ?>
</h3>

                <?php 
        if (metadata('item', 'has thumbnail')) {
 public function hookAdminItemsShowSidebar($args)
 {
     $item = $args['item'];
     $html = '<div class="info panel">';
     $html .= '<h4>' . __('Multiple Collections') . '</h4>';
     $collections = multicollections_get_collections_for_item($item);
     // No collection.
     if (empty($collections)) {
         $html .= '<p>' . __('No multiple collections') . '</p>';
     } else {
         $html .= '<ul>';
         foreach ($collections as $collection) {
             $html .= '<li>';
             $html .= __('%s [Items count: %d]', link_to_collection(null, array(), 'show', $collection), multicollections_total_items_in_collection($collection));
             $html .= '</li>';
         }
         $html .= '</ul>';
     }
     $html .= '</div>';
     echo $html;
 }
/**
 * Corresponds to regular function link_to_items_browse().
 *
 * @see link_to_items_browse()
 * @uses link_to()
 * @param string|null $text
 * @param array $props
 * @param string $action
 * @param Collection $collectionObj
 * @return string
 */
function multicollections_link_to_items_in_collection($text = null, $props = array(), $action = 'browse', $collectionObj = null)
{
    if (!$collectionObj) {
        $collectionObj = get_current_record('collection');
    }
    $queryParams = array();
    $queryParams['multi-collection'] = $collectionObj->id;
    if ($text === null) {
        $text = multicollections_total_items_in_collection($collectionObj);
    }
    return link_to('items', $action, $text, $props, $queryParams);
}