aboutsummaryrefslogtreecommitdiff
path: root/views/default/icon
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/icon')
-rw-r--r--views/default/icon/default.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index a29886064..c033a256b 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -18,13 +18,19 @@ if (!in_array($vars['size'], $sizes)) {
$vars['size'] = "medium";
}
+if (isset($entity->name)) {
+ $title = $entity->name;
+} else {
+ $title = $entity->title;
+}
+
$url = $entity->getURL();
if (isset($vars['href'])) {
$url = $vars['href'];
}
$img_src = $entity->getIcon($vars['size']);
-$img = "<img src=\"$img_src\" />";
+$img = "<img src=\"$img_src\" alt=\"$title\" />";
if ($url) {
echo elgg_view('output/url', array(