diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-allSubjectHeadingsWithExtended.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-allSubjectHeadingsWithExtended.phtml new file mode 100644 index 0000000000000000000000000000000000000000..29a5cdbf143a42f45143e60ce44bb0f90c988fb3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-allSubjectHeadingsWithExtended.phtml @@ -0,0 +1,18 @@ +<!-- finc: RecordDriver - solrMarc data-allSubjectHeadingsWithExtended --> +<?php if(!empty($data)): ?> + <?php foreach ($data as $field): ?> + <div class="subject-line" property="keywords"> + <?php $subject = ''; ?> + <?php if(count($field) == 1 && !isset($field['subject'])) $field = explode('--', $field[0]); ?> + <?php if(isset($field['subject'])): // extended topics ?> + <?php $field = $field['subject']; ?> + <?php endif; ?> + <?php $i = 0; foreach ($field as $subfield): ?> + <?=($i++ == 0) ? '' : ' > '?> + <?php $subject = trim($subject . ' ' . $subfield); ?> + <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a> + <?php endforeach; ?> + </div> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - solrMarc data-allSubjectHeadingsWithExtended - END -->