On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    I noticed a new field when setting a template : in french it appears as "icône", right after the description field. it's optional and seams to stand for a "personalized class for alla ressources using this tpl"

    Rigght but what's the corresponding tv ?
    [[*icon]] (or [[+ ) does not returns anything.

    Any informations about it ?

    thank you
    • I believe that it's supposed to be for an image to use as the icon in the Resource Tree for resources using that template. I don't know if it actually works, though.

      https://github.com/modxcms/revolution/issues/11784
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • thank you.

        But I don't know how to use it .. Reading the issue on Github I understood there might exist somewhere a list of all 'classes' or icons names to be use ?
        or should we enter in the field an absolute/relative path pointing to an icon files ?


        • Choose them from http://fortawesome.github.io/Font-Awesome/3.2.1/icons/ specifically 3.2.1

          see attached
          • The intention is that every modDocument that uses a particular template can have a unique icon in the Resource tree. I don't think it's meant to apply to containers, symlinks, or weblinks. I'm not sure about static resources.

            I'd be curious to know how the Articles container gets the coffee-cup icon. [ed. note: BobRay last edited this post 5 years, 8 months ago.]
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
            • Looking in the manager's CSS file, it appears that it's using fontawesome version 4.2.0, yet the syntax and available icons appear to be for 3.2.1 huh
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
              • Quote from: BobRay at Jan 22, 2015, 11:17 PM
                The intention is that every modDocument that uses a particular template can have a unique icon in the Resource tree. I don't think it's meant to apply to containers, symlinks, or weblinks. I'm not sure about static resources.
                I'd be curious to know how the Articles container gets the coffee-cup icon.
                Icon applies to any resources that use a particular template. For example, you can use "icon-pdf" for pages with PDF content attached or something like that.
                Well, what about coffee icon, I'm gonna disappoint you, because they made it this way:
                .icon-coffee:before, .icon-css:before, .icon-htm:before, .icon-html:before, .icon-js:before, .icon-less:before, .icon-scss:before, .icon-styl:before, .icon-xml:before {
                    content: "\f1c9"
                }
                


                So you have to add your own class to manager's index.css file with the following content:
                    content: "\f0f4"


                And yes, they use an old 3.2.1 version of Font Awesome, so here's the link to icons you can choose from.
                  Kind regards
                • For those who are wondering wich string can be use in the icon field, here's an example :
                  icon-newspaper-o

                  And you can even use the spin effect :
                  icon-refresh icon-spin

                  Icons can be found here : http://fortawesome.github.io/Font-Awesome/icons/
                  Just remember to replace the defaut fa-* with icon-*
                  • For those playing at home after the fact who found this like I did, the FontAwesome version being used in MODX 2.5.7 is a 'conversion' of FontAwesome 4.7.0 and I found this in the comments at the top of the CSS file that lives here: /manager/templates/default/css/index.css

                    By 'conversion' I mean, as sotwell pointed out above, that the 'fa-' part of the class names seems to have been replaced with 'icon-', I imagine as a way of covering off backwards compatibility.