diff --git a/lef_fonctions.php b/lef_fonctions.php index f897d5b..0b68ca2 100644 --- a/lef_fonctions.php +++ b/lef_fonctions.php @@ -51,12 +51,16 @@ class LefPays { public function toArray() { $evenementsnationaux; + $totalevenementsnationaux = 0; if ($this->lieuxnationaux) { $evenementsnationaux = $this->lieuxnationaux->toArray(); + foreach($evenementsnationaux as $key => $array) { + $totalevenementsnationaux = $totalevenementsnationaux + count($array); + } } else { $evenementsnationaux = array(); } - return array("name" => $this->name, "code" => $this->code, "sousregions" => $this->regions, "evenementsnationaux" => $evenementsnationaux); + return array("name" => $this->name, "code" => $this->code, "sousregions" => $this->regions, "evenementsnationaux" => $evenementsnationaux, "totalevenementsnationaux" => $totalevenementsnationaux); } } diff --git a/modeles/agenda.html b/modeles/agenda.html index 30e479b..faaf895 100644 --- a/modeles/agenda.html +++ b/modeles/agenda.html @@ -2,7 +2,7 @@

#VALEUR{name}

-
[(#VALEUR{code}|=={internet}|?{'En ligne', 'À l’échelle nationale'})] ([(#VALEUR|count)]) +
[(#VALEUR{code}|=={internet}|?{'En ligne', 'À l’échelle nationale'})] ([(#VALEUR{totalevenementsnationaux})]) [
(#CLE)
]