<i class="icon-search"><i> icon-search==icon-search||<i class="icon-star"><i> icon-star==icon-star
This question has been answered by randall. See the first response.
First question detail - I would like to have a TV that offers a multi-select list of fontawesome icons.1. First thing you have to do is add the fontawesome css link to the manager template header.tpl file. I created an override template folder per http://rtfm.modx.com/display/revolution20/Manager+Templates+and+Themes] Because of the next step, I actually copied the fontawesome css file to that new folder - because I didn't want to change the main site css.
[class*=" icon-"] {
font-family: FontAwesome,Arial, Helvetica, sans-serif;<?php
$site_url=$modx->config['site_url'];
$pattern = '/\.(icon-(?:\w+(?:-)?)+):before\s/';
$subject = file_get_contents($site_url .'assets/components/epic-bootstrap/bootstrap/less/font-awesome/css/font-awesome.css');
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
foreach($matches as $match){
$iconclass = $match[1];
$iconselect = $modx->getChunk('epic.Icon',array('icon_class' => $iconclass .' icon-large')) .' '.$iconclass .'==' . $iconclass;
$icons= $icons . $iconselect .'||';
}
$icons= '--FontAwesome Icons--||' . $icons;
return ($icons);<i class="[[+icon_class]]"></i>
@EVAL return $modx->runSnippet('ParseIcons');you could also use a MIGX - TV - grid for displaying/selecting your icons
if you want to have filtering by icon-groups you could use a MIGXdb - TV with some special processors