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 <title> element).
This commit is contained in:
Bharat Mediratta
2008-11-26 21:50:45 +00:00
parent 4e8937ccef
commit 974f9f7788
12 changed files with 104 additions and 89 deletions
+2
View File
@@ -14,9 +14,11 @@
<?= $theme->header_bottom() ?>
<? if ($page_type != "tag"): ?>
<ul id="gBreadcrumbs" class="gClearFix">
<? foreach ($parents as $parent): ?>
<li><a href="<?= url::site("albums/{$parent->id}") ?>"><?= $parent->title_edit ?></a></li>
<? endforeach ?>
<li class="active"><?= $item->title_edit ?></li>
</ul>
<? endif ?>