<?php 
echo head(array('title' => $collectionTitle, 'bodyclass' => 'collections show'));
?>

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

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

<div id="collection-items">
    <!--<h2><?php 
echo link_to_items_browse(__('Items in the %', $collectionTitle), array('collection' => metadata('collection', 'id')));
?>
</h2>-->
    <?php 
if (metadata('collection', 'total_items') > 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'));
        ?>
Exemplo n.º 2
0
        ?>
</p>
                </div>
            <?php 
    } elseif ($description = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 250))) {
        ?>
                <div class="item-description">
                <?php 
        echo $description;
        ?>
                </div>
            <?php 
    }
    ?>
    <?php 
}
?>
    </div><!-- end collection-items -->
    <?php 
if (count($collectionItems) > 0) {
    ?>
    <p class="view-items-link"><?php 
    echo link_to_items_browse(__('View the items in %s', metadata('collection', array('Dublin Core', 'Title'))), array('collection' => $collectionId));
    ?>
</p>
    <?php 
}
?>
</div>
<?php 
echo foot();
Exemplo n.º 3
0
function mh_display_random_item($num = 1)
{
    echo $num <= 1 ? '<h2>Random ' . mh_item_label() . '</h2>' : '<h2>Random ' . mh_item_label('plural') . '</h2>';
    set_loop_records('items', get_random_featured_items($num, true));
    if (has_loop_records('items')) {
        foreach (loop('items') as $item) {
            echo '<article class="item-result">';
            echo '<h3>' . link_to_item(metadata($item, array('Dublin Core', 'Title'))) . '</h3>';
            echo '<div class="item-thumb">' . link_to_item(item_image('square_thumbnail')) . '</div>';
            if ($desc = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 200))) {
                echo '<div class="item-description">' . $desc . '</div>';
            } else {
                echo '<div class="item-description">Text preview unavailable.</div>';
            }
            echo '</article>';
        }
    }
    echo '<p class="view-more-link">' . link_to_items_browse('View all ' . mh_item_label('plural') . '') . '</p>';
}
Exemplo n.º 4
0
</p>
            <?php 
        }
        ?>
        </li>
        <?php 
    }
    ?>
        </ul>
        <?php 
} else {
    ?>
        <p><?php 
    echo __('No recent items available.');
    ?>
</p>
        <?php 
}
?>
        <p class="view-items-link"><?php 
echo link_to_items_browse(__('View All Items'));
?>
</p>
    </div><!-- end recent-items -->
</div><!-- end right-panel -->

<?php 
echo foot();
?>

Exemplo n.º 5
0
            ?>
</h3>
                <div class="element-text">
                    <p><?php 
            echo metadata('collection', array('Dublin Core', 'Contributor'), array('all' => true, 'delimiter' => ', '));
            ?>
</p>
                </div>
            </div>
            <?php 
        }
        ?>

<p class="view-items-link">
<?php 
        echo link_to_items_browse(__("Items"), array('collection' => metadata('collection', 'id')), array('title' => __('View the items in %s', strip_tags(metadata('collection', array('Dublin Core', 'Title'))))));
        ?>
</p>

            <?php 
        fire_plugin_hook('public_collections_browse_each', array('view' => $this, 'collection' => $collection));
        ?>
        </div>

    </div><!-- end class="collection" -->
    <?php 
    }
    ?>

    <?php 
    echo pagination_links();
Exemplo n.º 6
0
function custom_collectionTreeList($collectionTree, $linkToCollectionShow = true, $class = '')
{
    if (!$collectionTree) {
        return;
    }
    $collectionTable = get_db()->getTable('Collection');
    $html = '<ul class="' . $class . '">';
    foreach ($collectionTree as $collection) {
        $html .= '<li>';
        $subCollContent = custom_collectionTreeList($collection['children'], $linkToCollectionShow);
        if ($linkToCollectionShow && !isset($collection['current'])) {
            if (empty($subCollContent)) {
                $html .= link_to_items_browse($collection['name'], $browseParams = array('collection' => $collection['id']));
            } else {
                $html .= $collection['name'];
            }
            //$html .= link_to_collection(null, array(), 'show', $collectionTable->find($collection['id']));
        } else {
            $html .= $collection['name'] ? $collection['name'] : '[Untitled]';
        }
        $html .= $subCollContent;
        $html .= '</li>';
    }
    $html .= '</ul>';
    return $html;
}
Exemplo n.º 7
0
} else {
    //if not stealth mode, do everything else
    echo head(array('maptype' => 'focusarea', 'bodyid' => 'home', 'bodyclass' => 'home'));
    ?>

	
<div id="content">
<article id="homepage">

	<div id="desktop-block">
			<section id="custom-block">
				<?php 
    mh_custom_content();
    echo random_item_link("View A Random " . mh_item_label('singular'), 'big-button');
    $text = 'View all <span>' . total_records('Item') . ' ' . mh_item_label('plural') . '</span>';
    echo '<p class="view-more-link">' . link_to_items_browse($text) . '</p>';
    ?>
					
			</section>
				
			<section id="featured-story"> 
				<?php 
    echo mh_display_random_featured_item(true);
    ?>
			</section>	
					
	</div>	
			<section id="home-tours">
				<?php 
    mh_display_random_tours(11);
    ?>