Snippets

9 snippets on a page

11 months 3 days ago #91315

Laurent's Avatar Laurent

On this page

Confidential information:
(hidden)
i have 9 snippets with this code
{articles category="11" ordering="numero-zone ASC"} {slider title="[numero-zone] - [title]"}
<div class="res-item">
	<div class="res-item__img">[image-intro width="250" auto_titles="article"]</div>
	<div class="res-item__acti"><strong>Activité principale :</strong> [activite-principale]</div>
	{if dirigeant}
	<div class="res-item__dirig"><strong>Dirigeant :</strong> [dirigeant]</div>
	{/if} {if adresse}
	<div class="res-item__add"><strong>Adresse :</strong> [adresse]</div>
	{/if} {if telephone}
	<div class="res-item__web"><strong>Téléphone :</strong> [telephone]</div>
	{/if} {if courriel}
	<div class="res-item__web"><strong>Courriel :</strong> [courriel]</div>
	{/if} {if site-internet}
	<div class="res-item__web"><strong>Site internet :</strong> [site-internet]</div>
	{/if} {if facebook}
	<div class="res-item__web"><strong>Page Facebook :</strong> [facebook]</div>
	{/if} {if introtext}
	<div class="res-item__desc"><strong>Descriptif :</strong> [introtext strip="true"]</div>
	{/if}
</div>
{if last}{/sliders}{/if} {/articles}

I find that the page is a little bit slow to display, is it because of the 9 snippets or this is because of articles anywhere tags ?

The only change on all snippets is the category ID, is it better to use dynamic snippet like that ?
{articles category="\1" ordering="numero-zone ASC"} {slider title="[numero-zone] - [title]"}
<div class="res-item">
	<div class="res-item__img">[image-intro width="250" auto_titles="article"]</div>
	<div class="res-item__acti"><strong>Activité principale :</strong> [activite-principale]</div>
	{if dirigeant}
	<div class="res-item__dirig"><strong>Dirigeant :</strong> [dirigeant]</div>
	{/if} {if adresse}
	<div class="res-item__add"><strong>Adresse :</strong> [adresse]</div>
	{/if} {if telephone}
	<div class="res-item__web"><strong>Téléphone :</strong> [telephone]</div>
	{/if} {if courriel}
	<div class="res-item__web"><strong>Courriel :</strong> [courriel]</div>
	{/if} {if site-internet}
	<div class="res-item__web"><strong>Site internet :</strong> [site-internet]</div>
	{/if} {if facebook}
	<div class="res-item__web"><strong>Page Facebook :</strong> [facebook]</div>
	{/if} {if introtext}
	<div class="res-item__desc"><strong>Descriptif :</strong> [introtext strip="true"]</div>
	{/if}
</div>
{if last}{/sliders}{/if} {/articles}

Thanks.

11 months 3 days ago #91316

Peter van Westen's Avatar Peter van Westen Admin

This is due to the Articles Anywhere tags.
And probably also because of the amount of html is being output by this.