diff --git a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php index de1180469102f55b32b4bdc84301a3b3c0a6834b..430cca1e8b7370e388469a0d5071b50cc17d05ab 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php @@ -529,15 +529,10 @@ class RecordDataFormatterFactory 'Published in', 'getContainerTitle', 'data-containerTitle.phtml' ); $spec->setLine( - 'New Title', 'getNewerTitles', null, ['recordLink' => 'title'] + 'New Title', 'getNewerTitles', 'data-linkViaFincId.phtml' ); $spec->setLine( - 'Previous Title', - 'getPreviousTitles', - null, - [ - 'recordLink' => 'title' - ] + 'Previous Title', 'getPreviousTitles', 'data-linkViaFincId.phtml' ); $spec->setTemplateLine( 'Authors/Corporations', diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml new file mode 100644 index 0000000000000000000000000000000000000000..64de315b4d81ead48e0585857fec8ea5b5354e36 --- /dev/null +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml @@ -0,0 +1,18 @@ +<!-- finc: RecordDriver - solrMarc - data-linkviafincid --> +<? if (!empty($data)): ?> +<? foreach($data as $field): ?> + <? if (isset($field['id']) || isset($field['text'])): + $url = isset($field['id']) + ? $this->url('record').$field['id'] + : $this->record($this->driver)->getLink('title', $field['text']); + ?> + <? if (isset($field['pretext']) && !empty($field['pretext'])): ?> + <?=$this->escapeHtml($field['pretext'])?>: + <? endif; ?> + <a href="<?=$url?>"><?=$this->escapeHtml($field['text'])?></a><br/> + <? else: ?> + <a href="<?=$this->record($this->driver)->getLink('title', $field)?>"><?=$this->escapeHtml($field)?></a><br/> + <? endif; ?> +<? endforeach; ?> +<? endif; ?> +<!-- finc: RecordDriver - solrMarc - data-linkviafincid - END -->