Skip to content

Commit 3395301

Browse files
committed
Prevent duplicates in alphabrowse useInstead and seeAlso headings
1 parent ef83815 commit 3395301

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

themes/bootstrap5/templates/alphabrowse/home.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<div>
117117
<?=$this->transEsc('Use instead') ?>:
118118
<ul>
119-
<?php foreach ($item['useInstead'] as $heading): ?>
119+
<?php foreach (array_unique($item['useInstead']) as $heading): ?>
120120
<li><a href="<?=$this->escapeHtmlAttr($this->url('alphabrowse-home', [], ['query' => ['from' => $heading] + $baseQuery]))?>"><?=$this->escapeHtml($heading)?></a></li>
121121
<?php endforeach; ?>
122122
</ul>
@@ -127,7 +127,7 @@
127127
<div>
128128
<?=$this->transEsc('See also') ?>:
129129
<ul>
130-
<?php foreach ($item['seeAlso'] as $heading): ?>
130+
<?php foreach (array_unique($item['seeAlso']) as $heading): ?>
131131
<li><a href="<?=$this->escapeHtmlAttr($this->url('alphabrowse-home', [], ['query' => ['from' => $heading] + $baseQuery]))?>"><?=$this->escapeHtml($heading)?></a></li>
132132
<?php endforeach; ?>
133133
</ul>

0 commit comments

Comments
 (0)