Skip to content
Snippets Groups Projects
Verified Commit f5e823c3 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Add TypoScript setting to disable the automatic related news output

parent b7931a14
No related branches found
No related tags found
1 merge request!44[BUGFIX] Fix bugs with fetching the related news
......@@ -19,5 +19,8 @@ plugin.tx_sgnews {
# sort direction (DESC / ASC)
sortDirection = DESC
# This enables the output of related news in regards to the news category or tags
enableAutomaticRelatedNews = 1
}
}
......@@ -109,6 +109,9 @@ plugin.tx_sgnews {
# The logo value for the structured data implementation (see single view template)
publisherLogo =
# This enables the output of related news in regards to the news category or tags
enableAutomaticRelatedNews = {$plugin.tx_sgnews.settings.enableAutomaticRelatedNews}
}
features {
......
......@@ -88,8 +88,8 @@
</div>
</div>
</section>
</div>
<section class="content">
<div class="container">
<div class="tx-sgnews-single">
......@@ -216,26 +216,31 @@
</div>
</f:then>
<f:else>
<sg:related news="{newsMetaData.news}" iteration="iterator" limit="5" as="relatedNewsEntry">
<f:if condition="{iterator.isFirst}">
<div class="tx-sgnews-single-related">
<h3>
<f:translate key="frontend.singleview.relatedArticles"/>
</h3>
<ul class="tx-sgnews-list tx-sgnews-overview">
</f:if>
<li class="col-md-4 col-sm-6 col-xs-12">
<f:render partial="TeaserRelated" arguments="{
news: relatedNewsEntry,
headerTag: '<h2>',
closingHeaderTag: '</h2>'
}" />
</li>
<f:if condition="{iterator.isLast}">
</ul>
</div>
</f:if>
</sg:related>
<f:if condition="{settings.enableAutomaticRelatedNews}">
<sg:related news="{newsMetaData.news}"
iteration="iterator"
limit="5"
as="relatedNewsEntry">
<f:if condition="{iterator.isFirst}">
<div class="tx-sgnews-single-related">
<h3>
<f:translate key="frontend.singleview.relatedArticles"/>
</h3>
<ul class="tx-sgnews-list tx-sgnews-overview">
</f:if>
<li class="col-md-4 col-sm-6 col-xs-12">
<f:render partial="TeaserRelated" arguments="{
news: relatedNewsEntry,
headerTag: '<h2>',
closingHeaderTag: '</h2>'
}" />
</li>
<f:if condition="{iterator.isLast}">
</ul>
</div>
</f:if>
</sg:related>
</f:if>
</f:else>
</f:if>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment