From 974f9f778891bbefeb083b2d97b3dae206c96452 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 26 Nov 2008 21:50:45 +0000 Subject: Add a new "tag" page type. Create the concept of "page types" which let us specify the kind of page that we're rendering in high level terms. Currently there are three page types: album, photo and tag. The tag page type uses slightly different variables. It has a $tag but no $item. Adjust all sidebar_block() functions to avoid printing stuff that's dependent on the item if there is no item. Simplify the tag code to stop trying to fake an item. Update the theme slightly to use $item and $tag where appropriate (notably, for making the element). --- modules/info/helpers/info_block.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules/info/helpers') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 40e5bb97..61115b2a 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -20,11 +20,13 @@ class info_block_Core { public static function sidebar_blocks($theme) { - $block = new Block(); - $block->id = "gMetadata"; - $block->title = _("Item Info"); - $block->content = new View("info_block.html"); - return $block; + if ($theme->item()) { + $block = new Block(); + $block->id = "gMetadata"; + $block->title = _("Item Info"); + $block->content = new View("info_block.html"); + return $block; + } } public static function thumbnail_info($theme, $item) { -- cgit v1.2.3