We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21056
    • 327 Posts
    We had a need for a new content type -- geoposition -- which uses Google Maps to allow a content editor to select a point on a map which a document relates to.

    I’ve done it by hacking 2 core files, but I’d like to put it into a plugin so that it can be uploaded to the repository.

    Is there any way of doing this using the current architecture? Can you hack the core files on the fly using system events?
      Author: ManagerManager plugin - customise your ModX manager interface

      Rckt - web development, Sheffield, UK
      • 7923
      • 4,213 Posts
      you can create a plugin that hides the standard content fields via javascript (there is atleast one available in these forums). You could make it check that is some certain template selected for example


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 6726
        • 7,075 Posts
        Yes and it’s named HideEditor but there is another one newer called Customize Manager Fields which is more powerful and more complex also...

        It should do the trick for you smiley
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 21056
          • 327 Posts
          It’s not quite that what I want to do -- I am adding a new option to the ’input types’ dropdown of creating/editing a template variable. So you can create a new type of input.
            Author: ManagerManager plugin - customise your ModX manager interface

            Rckt - web development, Sheffield, UK
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            No, you’ll need to hack the relevant manager files to do what you want. At least with this codebase.
              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
              • 6726
              • 7,075 Posts
              It sure is another story altogether... I hope we’ll have this into the next gen smiley
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 8960
                • 150 Posts
                Quote from: ncrossland at Mar 21, 2007, 03:26 AM

                It’s not quite that what I want to do -- I am adding a new option to the ’input types’ dropdown of creating/editing a template variable. So you can create a new type of input.

                You’ll see that in the Manager --> Tools --> Configuration that you can add "Custom Content Types" (which are actually MIME types) as seen in the screenshot. My question would be how is this actually used? When you click ’add’ to create a new type, what is this actually doing and how do I edit what I add?

                Note, what you are referring to kinda leads back to true Custom Content Types as discussed here.
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Quote from: er16004 at Mar 21, 2007, 07:43 AM

                  Note, what you are referring to kinda leads back to true Custom Content Types as discussed here.
                  This has nothing to do with Custom Content Types. Template Variable input types is what is being discussed in this thread, and I don’t see how it leads back at all, as content types refer to the type of content being returned by a MODx document/page.
                    • 21056
                    • 327 Posts
                    Quote from: sottwell at Mar 21, 2007, 04:03 AM

                    No, you’ll need to hack the relevant manager files to do what you want. At least with this codebase.

                    Once it’s all tested, would you be interested in a copy of the diffs to put into the distribution?
                      Author: ManagerManager plugin - customise your ModX manager interface

                      Rckt - web development, Sheffield, UK
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      The document-level "custom content types" that you can add to in the Configuration has to do with the actual MIME types a document can have, such as text/html, etc. It is reflected in the "type" dropdown for each document. They are used to create xml documents for news feeds, or to use a document as a css file, which allows for conditional styling via snippets and/or chunks.

                      What we’re talking about here is the "input" and "output widget" types available for TVs, such as the "imgage" input type, which causes the TV to display a text field along with a button to allow use of the resource manager for selecting or uploading images, and the "image" widget that formats the value of the TV as an image tag in the final output of the document.
                        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