Developing a custom Swift_ArticleList template I noticed a problem that will come up again and again in the future.
The architecture is that the paragraph template is building the container for the paragraph, this could be a slider for example. It then calls the Dynamicweb.Rendering.RenderItemList method inside this template and passes the necessary settings.
This is what is rendered if the item publisher fails to locate items
Inside the ItemPublisher/List/List.cshtml template that is used I can see this line GetBoolean("ItemPublisher:Items.Any");
How do we check if ItemPublisher has returned any items before we render the paragraph, before calling RenderItemList() ?
This is important, because we want to be able to hide the paragraph or show our own message if no results are found