Use icon helper with different icon-set by bigfoot90 · Pull Request #392 · braincrafted/bootstrap-bundle

In my project I'm using three different icon sets fa-* (fontawesome), glyphicons-* (glyphicons), md-* (material-design) for different sections: frontend and backend.

By this commit I can use the icon function like this:

{{ icon('camera') }}
{{ icon('alert', 'md') }}
{{ icon('user+fw', 'fa') }}

and the parse_icons filter like this:

{{ '.icon-heart'|parse_icons }}
{{ '.md-alert'|parse_icons }}
{{ '.fa-user+fw'|parse_icons }}

and will render to:

<i class="glyphicon glyphicon-heart"></i>
<i class="md md-alert"></i>
<i class="fa fa-user fa-fw"></i>