From 2a43428c44761fae91f4acf046faccae5cb32644 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 5 Dec 2010 23:54:32 +0000 Subject: rewrote breadcrumbs git-svn-id: http://code.elgg.org/elgg/trunk@7542 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/breadcrumbs.php | 47 +++++++++++++++----------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'views/default/navigation') diff --git a/views/default/navigation/breadcrumbs.php b/views/default/navigation/breadcrumbs.php index 8f5b52f14..67e985bed 100644 --- a/views/default/navigation/breadcrumbs.php +++ b/views/default/navigation/breadcrumbs.php @@ -1,11 +1,13 @@ 'The title', 'link' => 'url') + * @uses $vars['breadcrumbs'] (Optional) Array of arrays with keys 'title' and 'link' + * @uses $vars['class'] + * * @see elgg_push_breadcrumb */ @@ -15,29 +17,24 @@ if (isset($vars['breadcrumbs'])) { $breadcrumbs = elgg_get_breadcrumbs(); } -$formatted_breadcrumbs = array(); - -foreach ($breadcrumbs as $breadcrumb) { - $link = $breadcrumb['link']; - $title = $breadcrumb['title']; +$class = 'elgg-breadcrumbs'; +$additional_class = elgg_get_array_value('class', $vars, ''); +if ($additional_class) { + $class = "$class $additional_class"; +} - if (!empty($link)) { - $formatted_breadcrumbs[] = elgg_view('output/url', array( - 'href' => $link, - 'text' => $title - )); - } else { - $formatted_breadcrumbs[] = $title; +if (is_array($breadcrumbs) && count($breadcrumbs) > 0) { + echo "'; } - -$breadcrumbs_html = implode(' > ', $formatted_breadcrumbs); - -echo <<<___END - -
- $breadcrumbs_html -
- -___END; -?> \ No newline at end of file -- cgit v1.2.3