<?php
$collection=new yamlReadwriter();
$collection->loadYaml(getTemplate("structure_collection.yaml")); // charger la structure complète
// charger le contenu de l'item
$collection->loadContentFromYaml(CONTENTS."collections/".$collection_url);
$item=new yamlReadwriter();
$item->loadYaml(getTemplate("structure_item.yaml")); // charger la structure complète

// trouver le bon snippet
$snippet_item=getSnippetFile("display_item_mosaique.php");
echo "<section id=\"main-grid\" class=\"mosaique-grid\">";
foreach($collection->getAsarray('items') as $num => $item_url){
    $item->loadContentFromYaml(CONTENTS."items/".$item_url);            
    include($snippet_item);
}
echo "</section>";
?>