public function showHome()
 {
     $posts = ChesterWPCoreDataHelpers::getWordpressPostsFromLoop();
     $content_block_1 = $this->render('post_previews', array('posts' => $posts, 'next_posts_link' => get_next_posts_link(), 'previous_posts_link' => get_previous_posts_link()));
     $latestGallery = $this->render('galleries', array('posts' => ChesterWPCoreDataHelpers::getPosts(false, 'gallery', '1', array('location', 'map', 'website'))));
     echo $this->renderPage('grids/grid_two_column', array('content_block_1' => $content_block_1, 'content_block_2' => $latestGallery));
 }
 public function renderPage($templateName, $templateVars = false)
 {
     echo $this->render('header', ChesterWPCoreDataHelpers::getBlogInfoData());
     wp_head();
     echo $this->render('header_close', array('siteTitleHTML' => self::renderSiteTitle()));
     echo $this->render($templateName, $templateVars);
     wp_footer();
     echo $this->render('footer');
 }
 public function showPatternPrimer($foldersToConvert = array(), $patternsHTML = "")
 {
     $processedPatternSets = array(array('pathToTemplates' => dirname(__FILE__) . '/templates/', 'patternFolder' => 'patterns/', 'patternsTemplateLoader' => $this->patternPrimerTemplateLoader));
     foreach ($foldersToConvert as $folderToConvert) {
         $processedPatternSet = array('pathToTemplates' => str_replace('//', '/', dirname(__FILE__) . '/') . '../../../mvc/templates/', 'patternFolder' => $folderToConvert . '/', 'patternsTemplateLoader' => $this->coreTemplateLoader);
         array_push($processedPatternSets, $processedPatternSet);
     }
     $blogInfo = ChesterWPCoreDataHelpers::getBlogInfoData();
     echo $this->coreTemplateLoader->render('header', ChesterWPCoreDataHelpers::getBlogInfoData());
     echo $this->patternPrimerTemplateLoader->render('pattern_primer_header', array('syntaxhighlighter_directory' => $blogInfo['template_url'] . '/lib/Chester/lib/syntaxhighlighter_3.0.83/'));
     echo $this->coreTemplateLoader->render('header_close', FALSE);
     echo $this->patternPrimerTemplateLoader->render('pattern_primer_page', array('patterns' => $this->renderPatterns($processedPatternSets) . $patternsHTML));
     echo $this->coreTemplateLoader->render('footer', FALSE);
 }
Exemplo n.º 4
0
 public function index()
 {
     $posts = ChesterWPCoreDataHelpers::getWordpressPostsFromLoop();
     $this->renderPage('post_previews', array('posts' => $posts, 'next_posts_link' => get_next_posts_link(), 'previous_posts_link' => get_previous_posts_link()));
 }