Ejemplo n.º 1
0
 public static function smartTags($app, $data)
 {
     $data = Cms::twSlider($app, $data);
     preg_match_all("/\\[\\[[a-zA-Z]*\\]\\]/", $data, $res);
     foreach ($res[0] as $tag) {
         $stripped = str_replace(array("[", "]"), "", $tag);
         $cnt = $app['twig']->render($stripped . '.twig');
         $data = str_replace($tag, $cnt, $data);
     }
     return $data;
 }