diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-11-17 13:42:51 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-17 14:04:45 -0800 |
| commit | 1067e68292852f524fceda4c6cf7cd5f7110b234 (patch) | |
| tree | b42d9d2814a4a96bbdc63b5280cc22572402c0bb /modules/tag | |
| parent | ade642cff4a4ca810f468723b04efc6f229916d8 (diff) | |
Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics. Currently the top level bucket
collection, item, other
Here are the core subtypes so far:
collection: album, search, tag
item: movie, photo
other: login, reset, comment-fragment, comment
It's legal to create new page_subtypes whenever you want. Use the
appropriate page_type to get the coarse grain behavior that you want.
Diffstat (limited to 'modules/tag')
| -rw-r--r-- | modules/tag/controllers/tags.php | 2 | ||||
| -rw-r--r-- | modules/tag/helpers/tag_block.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index c3b14fcc..52001719 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -34,7 +34,7 @@ class Tags_Controller extends REST_Controller { url::redirect($album->abs_url("page=$max_pages")); } - $template = new Theme_View("page.html", "tag"); + $template = new Theme_View("page.html", "collection", "tag"); $template->set_global("page", $page); $template->set_global("max_pages", $max_pages); $template->set_global("page_size", $page_size); diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php index 20ef18fa..f0b56175 100644 --- a/modules/tag/helpers/tag_block.php +++ b/modules/tag/helpers/tag_block.php @@ -32,7 +32,7 @@ class tag_block_Core { $block->content = new View("tag_block.html"); $block->content->cloud = tag::cloud(30); - if ($theme->item() && $theme->page_type() != "tag" && access::can("edit", $theme->item())) { + if ($theme->item() && $theme->page_subtype() != "tag" && access::can("edit", $theme->item())) { $controller = new Tags_Controller(); $block->content->form = tag::get_add_form($theme->item()); } else { |
