We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10378
    • 375 Posts
    Hi,

    I'm currently readying our upcoming GoodNews add-on for upcoming release of Revo 2.3. As we use a custom resource type, we override the tree icon with our custom icon.

    In current Revo versions this could be done by using the background-image property of the .x-tree-node-icon class:

    /* MODx tree-node icon override (<= MODX 2.2.9) */
    .icon-goodnewsresourcecontainer .x-tree-node-icon {
        background-image: url(../img/goodnews.png) !important;
    }
    


    Since Revo 2.3 the resource tree icons are built with the fontawesome icon-fonts. To override the default font-icon seems to be easy but I miss the unique parent class which until now was built automatically from your resource class name with the prefix .icon- - in my case .icon-goodnewsresourcecontainer

    How can I select my custom resource tree-item under 2.3.x?

    Below is the CSS part with which I tried to override the tree icon in 2.3.x - but the custom class is missing:

    /* MODx tree-node icon override (>= MODX 2.3) http://fontawesome.io */
    .tree-resource:before {
        content: "\f003" !important; /* mail envelope icon */
    }
    


    Thanks for your help!
    Martin
      Freelancer @bitego http://www.bitego.com
      ---
      GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
      More infos here: http://www.bitego.com/extras/goodnews/