From 5946b5ec5aa017b419528b6525afbf0062e7dece Mon Sep 17 00:00:00 2001
From: Robert Lange <robert.lange@uni-leipzig.de>
Date: Tue, 8 Jun 2021 14:56:42 +0200
Subject: [PATCH] refs #20022 [fid_adlr] result list: add lazy fallback search
 in case of calling a missing record

* also do not check for existence of linked record on every call (implemented in 16914)
---
 .../templates/RecordDriver/DefaultRecord/result-list.phtml    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml
index f3ed0336e08..ad1fd4c99ae 100644
--- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml
+++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml
@@ -62,7 +62,7 @@ if ($cover):
             <?php $containerID = $this->driver->getContainerRecordID(); ?>
             <?php /* TODO: handle highlighting more elegantly here: */ ?>
             <?php if ($containerID): ?>
-              <?php $recordLinkUrl = $this->recordLink()->getUrl("$containerSource|$containerID"); ?>
+              <?php $recordLinkUrl = $this->recordLink()->getUrl("$containerSource|$containerID", $journalTitle, 'JournalTitle'); ?>
               <?php if ($recordLinkUrl != ""): ?>
                 <a href="<?=$recordLinkUrl?>"><?=$this->highlight($journalTitle) ?></a>
               <?php else: ?>
@@ -83,7 +83,7 @@ if ($cover):
             <?php foreach ($summInCollection as $collId => $collText): ?>
               <div>
                 <strong><?=$this->transEsc("in_collection_label")?></strong>
-                <a class="collectionLinkText" href="<?=$this->recordLink()->getUrl($collId)?>">
+                <a class="collectionLinkText" href="<?=$this->recordLink()->getUrl($collId, $collId, 'ParentID')?>">
                   <?=$this->escapeHtml($collText)?>
                 </a>
               </div>
-- 
GitLab