diff --git a/application/src/Site/BlockLayout/BrowsePreview.php b/application/src/Site/BlockLayout/BrowsePreview.php index a470a0ac34..bcc45a6072 100644 --- a/application/src/Site/BlockLayout/BrowsePreview.php +++ b/application/src/Site/BlockLayout/BrowsePreview.php @@ -71,7 +71,7 @@ public function form(PhpRenderer $view, SiteRepresentation $site, 'type' => Element\Text::class, 'options' => [ 'label' => 'Link text', // @translate - 'info' => 'Text for link to full browse view, if any.', // @translate + 'info' => 'Text for link to full browse view, if any. There is no link for media.', // @translate ], ]); @@ -117,11 +117,13 @@ public function render(PhpRenderer $view, SitePageBlockRepresentation $block) 'media' => 'media', ]; + // There is no list of media in public views. + $linkText = $resourceType === 'media' ? '' : $block->dataValue('link-text'); return $view->partial('common/block-layout/browse-preview', [ 'resourceType' => $resourceTypes[$resourceType], 'resources' => $resources, 'heading' => $block->dataValue('heading'), - 'linkText' => $block->dataValue('link-text'), + 'linkText' => $linkText, 'query' => $originalQuery, ]); }