template_engine->assigned( 'pages' ) ) { $this->assign('pages', Posts::get( array( 'content_type' => 'page', 'status' => Post::status('published'), 'nolimit' => 1 ) ) ); } if( !$this->template_engine->assigned( 'user' ) ) { $this->assign('user', User::identify() ); } if( !$this->template_engine->assigned( 'page' ) ) { $this->assign('page', isset( $page ) ? $page : 1 ); } if( !$this->template_engine->assigned( 'tags' ) ) { $tags= DB::get_results( 'SELECT * FROM ' . DB::table('tags') ); $tags= array_filter($tags, create_function('$tag', 'return (Posts::count_by_tag($tag->tag_slug, "published") > 0);')); $this->assign('tags', $tags); } $this->assign( 'nav_pages', Posts::get( array( 'limit' => 5, 'content_type' => 'page', 'status' => 'published', 'orderby' => 'slug ASC' ))); $this->assign( 'recent_posts', Posts::get(array ( 'limit' => 5, 'content_type' => 'entry', 'status' => 'published', 'orderby' => 'pubdate DESC' ))); parent::add_template_vars(); } } ?>