Skip to content

Commit

Permalink
Theme: thePrestige. Move back to overriding Theme::add_template_vars …
Browse files Browse the repository at this point in the history
…from using the action to modify it's results. The performance differences between the two are surprising.

git-svn-id: http://svn.habariproject.org/habari-extras/themes/thePrestige/trunk@3843 f4a90942-1786-4aa1-b092-57c31935ddc3
  • Loading branch information
rickc authored and rickc committed Apr 10, 2011
1 parent 3c3121a commit 8322b1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ function action_init_theme( $theme )
* template. So the values here, unless checked, will overwrite any existing
* values.
*/
public function action_add_template_vars( $theme, $handler_vars )
public function add_template_vars()
{
parent::add_template_vars();
if( !$this->template_engine->assigned( 'pages' ) ) {
$this->assign('pages', Posts::get( array( 'content_type' => 'page', 'status' => Post::status('published'), 'nolimit' => true ) ) );
}
Expand All @@ -65,7 +66,8 @@ public function action_add_template_vars( $theme, $handler_vars )
$this->assign('all_tags', Tags::vocabulary()->get_tree() );
}
if( !$this->template_engine->assigned( 'all_entries' ) ) {
$this->assign( 'all_entries', Posts::get( array( 'content_type' => 'entry', 'status' => 'published', 'nolimit' => 1 ) ) );
// List of all the tags
$this->assign('all_entries', Posts::get( array( 'content_type' => 'entry', 'status' => 'published', 'nolimit' => 1 ) ) );
}

Stack::add('template_header_javascript', Site::get_url('scripts') . "/jquery.js", 'jquery' );
Expand Down Expand Up @@ -151,7 +153,6 @@ public function theme_comment_form( $theme )
{
$theme->post->comment_form()->out();
}

}

?>

0 comments on commit 8322b1b

Please sign in to comment.