. */ // This is the methods used by the compiled templates require_once '../class.miniskel.php'; class skelMethods extends miniSkel { public function processLoopType_article($criterias) { $exist = false; // We only show articles with id == 1 // it's just to show how you can use criterias foreach ($criterias as $criteria) { if ($criteria['action'] == miniSkel::ACTION_MATCH_FIELD_BY_VALUE && $criteria['field'] == 'id_article') { if ($criteria['value'] == 1) $exist = true; } } if ($exist) { return array(array( 'titre' => 'Ceci est un titre', 'texte' => 'Ceci est un texte', 'nom' => 'Toto', 'date' => date('d/m/Y'), )); } } // Simple public wrapper public function callModifier($name, $value, $args=array()) { return parent::callModifier($name, $value, $args); } } $variables = array( 'titre_site' => 'Web 2.0 thing', ); $skelMethods = new skelMethods; ?>