diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2011-08-07 13:27:27 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2011-08-07 13:41:47 -0700 |
commit | dd0b622ae9e269e828699928fa8bddcd17d66225 (patch) | |
tree | 4de47a1cf57fa0dd029a9ebfcf83c67bcb57cafe /modules/tag/controllers | |
parent | c986b45931c8c168de478c48db0a8024ce99b7b8 (diff) |
Initial commit of a patch for Ticket #1764. as discussed here: https://github.com/gallery/gallery3/pull/58/files#r72949.
Create a Breadcrumb library which has two static methods for_item (which takes a an item and builds the entire
breadcrumb for the item) or build (which takes a variable number of Breadcrumb elements and creates a breadcrumb
based on the specified elements).
Used tag->url() to build the tag album url. Escaped the query string for the search. Tightened up the breadcrumb code
in page.html.php.
When adding the show query parameter, we can't blindly concatenate using the ? separator. We have to check that we
use a & if a query parameter already exists.
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r-- | modules/tag/controllers/tag.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php index 8f885dea..44a171fd 100644 --- a/modules/tag/controllers/tag.php +++ b/modules/tag/controllers/tag.php @@ -40,6 +40,9 @@ class Tag_Controller extends Controller { "page_size" => $page_size, "tag" => $tag, "children" => $tag->items($page_size, $offset), + "breadcrumbs" => Breadcrumb::build_from_list( + new Breadcrumb(item::root()->title, "/", item::root()->id), + new Breadcrumb($tag->name, $tag->url())), "children_count" => $children_count)); $template->content = new View("dynamic.html"); $template->content->title = t("Tag: %tag_name", array("tag_name" => $tag->name)); |