From 6a64b7d0b595c97c4bef9a8fa22d567611fb3fd1 Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 25 May 2010 21:25:42 +0000 Subject: Navigation/tabs uses output/url for the links. git-svn-id: http://code.elgg.org/elgg/trunk@6219 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/tabs.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/navigation/tabs.php b/views/default/navigation/tabs.php index 8a51c7f3d..38a85dca2 100644 --- a/views/default/navigation/tabs.php +++ b/views/default/navigation/tabs.php @@ -6,6 +6,8 @@ * @uses array $vars['tabs'] A multi-dimensional array of tab entries in the format array( * 'title' => string, // Title of link * 'url' => string, // URL for the link + * 'url_js' => string, // JS to pass to the link + * 'url_class' => string, // Class to pass to the link * 'class' => string // Class of the li element. * 'selected' => bool // if this link is currently selected * ) @@ -34,7 +36,23 @@ if (isset($vars['tabs'])) { $title = htmlentities($info['title'], ENT_QUOTES, 'UTF-8'); $url = htmlentities($info['url'], ENT_QUOTES, 'UTF-8'); - echo "
  • $title
  • "; + $options = array( + 'href' => $url, + 'title' => $title, + 'text' => $title + ); + + if (isset($info['url_js'])) { + $options['js'] = $info['url_js']; + } + + if (isset($info['url_class'])) { + $options['class'] = $info['url_class']; + } + + $link = elgg_view('output/url', $options); + + echo "
  • $link
  • "; } ?> -- cgit v1.2.3