Skip to content

Instantly share code, notes, and snippets.

@pepebe
Last active January 28, 2016 13:24
Show Gist options
  • Save pepebe/d2030a2c3920ce3000d1 to your computer and use it in GitHub Desktop.
Save pepebe/d2030a2c3920ce3000d1 to your computer and use it in GitHub Desktop.
Show custom icons in modx 2.3.1 manager tree
<?php
/*
Add fontawesome plugin
Author:
[email protected]
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment