Added breadcrumbs to pages display.
This commit is contained in:
parent
d76d8569af
commit
892d28b2ad
@ -31,8 +31,15 @@ class Pages_Controller extends Controller {
|
|||||||
throw new Kohana_404_Exception();
|
throw new Kohana_404_Exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set up breadcrumbs.
|
||||||
|
$breadcrumbs = array();
|
||||||
|
$root = item::root();
|
||||||
|
$breadcrumbs[] = Breadcrumb::instance($root->title, $root->url())->set_first();
|
||||||
|
$breadcrumbs[] = Breadcrumb::instance(t($existing_page[0]->title), url::site("pages/show/{$page_name}"))->set_last();
|
||||||
|
|
||||||
// Display the page.
|
// Display the page.
|
||||||
$template = new Theme_View("page.html", "other", "Pages");
|
$template = new Theme_View("page.html", "other", "Pages");
|
||||||
|
$template->set_global(array("breadcrumbs" => $breadcrumbs));
|
||||||
$template->page_title = t("Gallery :: ") . t($existing_page[0]->title);
|
$template->page_title = t("Gallery :: ") . t($existing_page[0]->title);
|
||||||
$template->content = new View("pages_display.html");
|
$template->content = new View("pages_display.html");
|
||||||
$template->content->title = $existing_page[0]->title;
|
$template->content->title = $existing_page[0]->title;
|
||||||
|
Reference in New Issue
Block a user