aboutsummaryrefslogtreecommitdiff
path: root/views/default/layout_elements/media.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/layout_elements/media.php')
-rw-r--r--views/default/layout_elements/media.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/views/default/layout_elements/media.php b/views/default/layout_elements/media.php
index 5f4e51d57..fcf0fba77 100644
--- a/views/default/layout_elements/media.php
+++ b/views/default/layout_elements/media.php
@@ -12,8 +12,9 @@
* @uses $vars['body'] HTML content of the body block
* @uses $vars['icon'] HTML content of the icon block
* @uses $vars['class'] Optional additional class for media element
+ * @uses $vars['id'] Optional id for the media element
* @uses $vars['body_class'] Optional additional class for body block
- * @uses $vars['icon_class'] Optional additional class for icon block
+ * @uses $vars['icon_class'] Optional additional class for icon block
*/
$body = elgg_get_array_value('body', $vars, '');
@@ -25,6 +26,11 @@ if ($additional_class) {
$class = "$class $additional_class";
}
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+}
+
$body_class = 'elgg-body';
$additional_class = elgg_get_array_value('body_class', $vars, '');
if ($additional_class) {
@@ -42,7 +48,7 @@ if ($icon_block) {
}
echo <<<HTML
-<div class="$class clearfix">
+<div class="$class clearfix" $id>
$icon_block$body
</div>
HTML;