From bac4ff2046a9413ad53caca47842b63d3e5a5385 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 27 Nov 2008 16:19:07 +0000 Subject: 1) Create a Theme_View class that combines the functionality of the Theme class with the View class. 2) Only define the form.html.php::DrawForm method once if there are multiple forms on the page (i.e. comments and add tags) --- modules/tag/controllers/tags.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'modules/tag/controllers') diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index e2ab8f87..34474be5 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -25,18 +25,14 @@ class Tags_Controller extends REST_Controller { $theme_name = "default"; $page_size = 9; - $template = new View("page.html"); + $template = new Theme_View("page.html", "tag", $theme_name); $page = $this->input->get("page", "1"); - $theme = new Theme($theme_name, $template); - $template->set_global("page_type", "tag"); $template->set_global('page_size', $page_size); $template->set_global('tag', $tag); $template->set_global('children', $tag->items($page_size, ($page-1) * $page_size)); $template->set_global('children_count', $tag->count); - $template->set_global('theme', $theme); - $template->set_global('user', Session::instance()->get('user', null)); $template->content = new View("tag.html"); print $template; -- cgit v1.2.3