find("template=post,sort=-date"); foreach($posts as $post){ $template = new TemplateFile($config->paths->templates . "markup/post_small.inc"); $template->set('title', $post->title); $template->set('date', $post->getUnformatted('date')); $template->set('url', $post->httpUrl); $template->set('image', (count($post->images) ? "" : "")); $template->set('body', $post->get('summary|body')); $template->set('id', $post->id); $output_posts .= $template->render(); }; $template = new TemplateFile($config->paths->templates . "markup/list_blog.inc"); $template-> set('posts', $output_posts); $content = $template->render();