Web\MenuRenderer: support webfont icons

refs #6936
This commit is contained in:
Thomas Gelf 2014-11-13 15:21:49 +01:00
parent 1aa8858dca
commit 29c7c2e707
1 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,14 @@ class MenuRenderer extends RecursiveIteratorIterator
Logger::error('Could not invoke custom renderer. Exception: '. $e->getMessage());
}
}
if ($child->getIcon() && strpos($child->getIcon(), '.') === false) {
return sprintf(
'<a href="%s" class="icon-%s">%s</a>',
$child->getUrl() ?: '#',
$child->getIcon(),
htmlspecialchars($child->getTitle())
);
}
return sprintf(
'<a href="%s">%s%s</a>',
$child->getUrl() ?: '#',