Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (16 sloc) 869 Bytes

Use the metadata function to get the Element Set metadata for a collection. The snippet option can be used to limit the information to only the first 150 characters.

<div class="collection record">
        $description = metadata($collection, array('Dublin Core', 'Description'), array('snippet' => 150));
    <?php if ($description): ?>
        <p class="collection-description"><?php echo $description; ?></p>
    <?php endif; ?>

When calling the metadata function within a loop, pass in a string of the current record type.

<h1><?php echo metadata('collection', array('Dublin Core', 'Title')); ?></h1>

The metadata function also grabs the record metadata.

<h1><?php echo metadata('simple_pages_page', 'title'); ?></h1>
You can’t perform that action at this time.