Skip to content

Commit

Permalink
fix(news): Check Resources enabled before lookup
Browse files Browse the repository at this point in the history
Ensure the Resources module is nabled before outputting a list of
related resources.
  • Loading branch information
zooley committed Feb 7, 2024
1 parent e07bd9c commit a03fe28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Modules/News/Resources/views/site/type.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
</span>
@endif
</li>
@if (\Nwidart\Modules\Facades\Module::isEnabled('resources'))
<?php
$resources = $article->resourceList()->get();
if (count($resources) > 0):
Expand All @@ -151,6 +152,7 @@
echo '<li><span class="fa fa-fw fa-tags" aria-hidden="true"></span> ' . implode(', ', $resourceArray) . '</li>';
endif;
?>
@endif
</ul>
<p itemprop="description">
{{ Illuminate\Support\Str::limit(strip_tags($article->toHtml()), 150) }}
Expand Down

0 comments on commit a03fe28

Please sign in to comment.