aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 12:20:45 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 12:20:45 +0000
commit304ca66699b7c5ccfd2d62604479e3b6ad496a03 (patch)
tree2296bdbf13badb6ab537a3cea5db05e66975c188
parentaf5896f771aa0d260659930dcb1d1f050e935ff9 (diff)
downloadelgg-304ca66699b7c5ccfd2d62604479e3b6ad496a03.tar.gz
elgg-304ca66699b7c5ccfd2d62604479e3b6ad496a03.tar.bz2
added a class variable to title view
git-svn-id: http://code.elgg.org/elgg/trunk@8072 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/views.php2
-rw-r--r--views/default/layout/elements/title.php9
2 files changed, 8 insertions, 3 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index bc9a6fd14..21409bab4 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1010,7 +1010,7 @@ function elgg_view_entity_annotations(ElggEntity $entity, $full = true) {
* This is a shortcut for {@elgg_view layout/elements/title}.
*
* @param string $title The page title
- * @param string $submenu Should a submenu be displayed? (default false, use not recommended and deprecated)
+ * @param string $submenu Should a submenu be displayed? (deprecated)
*
* @return string The HTML (etc)
*/
diff --git a/views/default/layout/elements/title.php b/views/default/layout/elements/title.php
index 5354352c9..19f47f4e6 100644
--- a/views/default/layout/elements/title.php
+++ b/views/default/layout/elements/title.php
@@ -1,9 +1,14 @@
<?php
/**
* Elgg title element
+ *
* @uses $vars['title'] The page title
+ * @uses $vars['class'] Optional class for heading
*/
-$display = "<h2>" . $vars['title'] . "</h2>";
+$class= '';
+if (isset($vars['class'])) {
+ $class = " class=\"{$vars['class']}\"";
+}
-echo $display; \ No newline at end of file
+echo "<h2{$class}>{$vars['title']}</h2>";