From 52aa1de0e8b98c6a4f630ad1b74a85c93b7e5a1c Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 27 Jan 2011 04:08:16 +0000 Subject: supporting adding a class to navigation tabs git-svn-id: http://code.elgg.org/elgg/trunk@7947 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/tabs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'views/default/navigation/tabs.php') diff --git a/views/default/navigation/tabs.php b/views/default/navigation/tabs.php index 4e9d1ee17..4a5a5e7a9 100644 --- a/views/default/navigation/tabs.php +++ b/views/default/navigation/tabs.php @@ -3,6 +3,7 @@ * Tab navigation * * @uses string $vars['type'] horizontal || vertical - Defaults to horizontal + * @uses string $vars['class'] Additional class to add to ul * @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 @@ -16,11 +17,15 @@ $type = elgg_get_array_value('type', $vars, 'horizontal'); if ($type == 'horizontal') { - $type_class = "elgg-tabs elgg-htabs mtm"; + $type_class = "elgg-tabs elgg-htabs"; } else { $type_class = "elgg-tabs elgg-vtabs"; } +if (isset($vars['class'])) { + $type_class = "$type_class {$vars['class']}"; +} + if (isset($vars['tabs']) && is_array($vars['tabs']) && !empty($vars['tabs'])) { ?>