Jump to:

5099 Posts in 1519 Topics by 1116 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Changing Tree Icons for Error Pages

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1650 Views
  • DanStephenson
    Avatar
    Community Member
    115 Posts

    Changing Tree Icons for Error Pages Link to this post

    Hello,

    Since I don't have a code page for Error Pages, is there a way to change their tree icons?

  • ambient
    Avatar
    Community Member
    101 Posts

    Re: Changing Tree Icons for Error Pages Link to this post

    Did you ever figure this one out Dan?

    I've tried by changing this line:

    static $icon = array("sapphire/javascript/tree/images/page", "file");

    to

    static $icon = array("sapphire/javascript/tree/images/page", "error");

    in sapphire\core\model\ErrorPage.php

    I added page-error.gif and png to the sapphire\javascript\tree\images folder but it still displays the original page-file icon.

    Whats weird is if I remove the line of code from the page then the error page icons disappear.

    Any ideas??

    Cheers

  • rohitbanerjee
    Avatar
    Community Member
    6 Posts

    Re: Changing Tree Icons for Error Pages Link to this post

    Did you try doing this in the _config.php file?

    ErrorPage::$icon = array('themes/rohitbanerjee-blocko/images/icons/error',"file");

    It worked for me and this way you dont have to touch or modify your Error page php file.

  • DanStephenson
    Avatar
    Community Member
    115 Posts

    Re: Changing Tree Icons for Error Pages Link to this post

    Much better solution! Thanks!

    1650 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.