We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45613
    • 45 Posts
    Is there any documentation of available MODExt xtypes?
    I was going thru the "Adding a Custom TV Type - MODX 2.2" tutorial and it uses
    xtype: 'modx-combo-template'
    I got the tutorial working, but it took a while to figure out where the list of templates was getting populated from.

    And this got me thinking - what other modx-combo-????? are available?
    or are there other modx-???? options are available and examples on how to use them?

    I did a few searches and did not find what I was looking for. If anyone can point me to a list, this would be great.

    Thanks,
    bill
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It would be great, but unfortunately there isn't.

      Quite a lot of them are created in the manager/assets/modext/widgets/core/modx.combo.js file.

      Some of these combos are populated from various getlist.class.php files in the core/model/modx/processors directory, their exact location depending on what exactly is being listed. Many of the combos that are for elements use the core/model/modx/processors/elements/getlistbyclass.class.php file, which is extended directly from the modProcessor class.

      modSnippetGetListProcessor extends modElementGetListProcessor
      modElementGetListProcessor extends modObjectGetListProcessor
      modObjectGetListProcessor extends modObjectProcessor
      modObjectProcessor extends modProcessor

        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
        • 45613
        • 45 Posts

        Thanks, At least I know where to look now!
          • 3749
          • 24,544 Posts
          Here you go: http://bobsguides.com/xtype-list.html. wink

          I think this is a complete list, but I can't guarantee it.
            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
            • 45613
            • 45 Posts
            Bob this is a cool list. For one, you get a list of all the xtypes used within the files - The alphabetical list.
            Then the xtypes by file gives you examples of how to use an xtype.

            So, lets say you see modx-combo-template in the alphabetical list, and want some examples, well, do a quick browser search and you see it was used in "manager/assets/modext/widgets/resource/modx.tree.resource.js".

            Go open up that file, and you search for modx-combo-template, and you see an example of how the combo box is added to a column. It even shows you the action called "getList".

            Pretty cool.

            Now, add Susan's information that most are in modx.combo.js and you can find the definition by searching for "Ext.reg('modx-combo-template'". This will give you the internal config defined in MODx.combo.Template.

            This is nice because it points you to the URL used in
            url: MODx.config.connectors_url+'element/template.php'

            This points you to the connector, that ultimately points you to model/element/template/getlist.class.php. - Some of these class files have some simple comments / documentation at the begining of these files.

            Not quite an RTFM, but it put some pieces together to try to explain or understand some more options.

            Thanks for pulling this together so quickly. I think it will be helpful to some folks, and maybe it can lead to some documentation of some of these in the future.

              • 3749
              • 24,544 Posts
              If I was *really* cool, the alphabetical list would be links to an instance above, and the references in the first list would be links that opened that file in a popup to a line showing the xtype. wink

                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