27
Aug
6
Spice up your CMS Sitetree!
So you have created your own page types, but they all look the same in your CMS site tree. Time to make them more recognizable!
This is quite easy, but it can make your site tree a lot more attractive.
First grab some icons, buy them or create you own custom aesthetic icon set. They only thing you have to keep in mind, is that your icons need to be saved as youriconname-file.gif.
Next create a folder in mysite, like /images/icons, to store your icons.
To assign a icon to your page class, add the a static $icon var to your page class like:
See that I don't add -file.gif to it.
Now go to your your CMS admin and see the result.
I maybe overdone it a little bit, but on the left is how my sandbox tree looks.
About the Author
Name: Martijn van Nieuwenhoven
Website: http://www.mediavacature.nl
Martijn van Nieuwenhoven runs the largest Dutch Jobboard for Media, Marcom and Graphic related jobs. He also develops websites and applications for small business companies based in The Netherlands.
Comments (6)
-
Old, but for future reference:
You van change icons in _config.php as well with
RedirectorPage::$icon = array('mysite/images/icons/redirector',"file");Posted by Martijn, 21/07/2010 1:49pm (8 days ago)
-
If you've subclassed a page, eg ErrorPage as MyErrorPage, you can make it appear in the CMS as "Error Page" by setting static $add_action = "Error Page".
Posted by Toby Champion, 25/11/2009 10:56pm (8 months ago)
-
@Toby : Yes. Subclass the Errorpage and use static $hide_ancestor = 'ErrorPage'; to hide the parent class and only use your custom Errorpage.
Posted by Martijn, 15/11/2009 7:04am (9 months ago)
-
How did you set the treeicon for ErrorPage? By subclassing ErrorPage?
Posted by Toby Champion, 12/11/2009 11:39pm (9 months ago)
-
Barry: Yes that's the idea :). Thanks. They have to be there, but I like it to group the pages that don't need any editing. In this setup clients cannot delete the search and errorpage either, only change the title and message.
Posted by Martijn, 27/08/2009 9:14pm (11 months ago)
-
Not withstanding the pretty icons, I like the way you've organised the site. Especially indicating 'special pages' to the client. i.e. 'don't touch!'
Posted by Barry, 27/08/2009 4:23pm (11 months ago)
RSS feed for comments on this page RSS feed for all comments