pepebe
8/8/2014 - 1:47 PM

Show custom icons in modx 2.3.1 manager tree

Show custom icons in modx 2.3.1 manager tree

<?php
/*
Add fontawesome plugin

Author:
info@pepebe.de

Desc:
-----
Temporary fix for missing custom tree icons. 

Event: 
------
OnManagerPageBeforeRender


Version:
--------
For the moment use font awesome 3.2.1

Final thoughts:
---------------
You might want to upload your own fontawesome.css to your server and use that one instead.

*/

$version = 321;

switch($version) {
    case 321:
        $css = '//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css';
        break;
    case 410:
        $css = '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css';
        break;
    default:
        $css = '//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css';
        break;
}

$modx->regClientCSS($css);

return;