Forums » Echo all Subjects

RSS feed for this topic

Info

  1. If I am following this paradigm:
    <?php echo item('Dublin Core', 'Subject'); ?>

    Detailed here:
    http://omeka.org/forums/topic/reordering-individual-metadata-fields

    http://omeka.org/forums/topic/order-of-meta-data-fields-in-item-display

    to display a subject. How do I display all subjects?

  2. <?php
    $subjects = item('Dublin Core', 'Subject', 'all');

    if (count($subjects) > 1):

    ?>

    <h3>Subjects</h3>
    <ul class="subject-list">
    <?php foreach ($subjects as $subject): ?>
    <li class="subject">
    <?php echo $subject; ?>

    <?php endforeach; ?>

    <?php endif; ?>

  3. Thanks, Aodiorne. Very helpful.

    Stephen

Reply

You must log in to post.