<h1>News</h1> [[$news-section]]
<h1>News</h1> [[$news-section]]
Inside the news-section snippet there is a getResource call.
What I want to do is to not show this whole section if getResource returns no news at all.
Is there any easy and DRY way to do it?
I don’t know about DRY, but couldn’t you have the getResource function (not in a chunk) save its output to a placeholder, then use the conditional on the placeholder?

I don’t know about DRY, but couldn’t you have the getResource function (not in a chunk) save its output to a placeholder, then use the conditional on the placeholder?
[[!getResources? &parents=`41` &hideContainers=`1` &tpl=`publication-list` &toPlaceholder=`publication-list` &limit=`5` &sortby=`publishedon` &includeTVs=`1` &processTVs=`1` &tvFilters=`specializations==%[[*id]]%` ]] [[!+publication-list:notempty=` <div id="pubs"> <h1 class="decorated"><span>Publikacje</span></h1> <ul class="pub-list"> [[+publication-list]] </ul> (...)