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

    I saw in the MODx features list that it supports something called "Custom Content Types". I couldn’t find any detailed description of what that is or how is it used. Can you briefly explain that or point me to the right document.

    Thanks!
      • 27376
      • 576 Posts
      Content type allows you specify a document as html, xml, css or any other type you can think of. It comes with a default list of Content types you can pick from, and you can also create your own in the configuration window.

      MIME Content Type on wikipedia

      Internet Media Type on wikipedia
        • 15949
        • 4 Posts
        Thank you, I thought that the term "custom content type" was used with another meaning - the ability to create your own document structure, i.e. text fields, images, videos, etc. all structured in a single document.

          • 25465
          • 8 Posts
          Quote from: kirilius at Mar 12, 2007, 07:07 PM

          Thank you, I thought that the term "custom content type" was used with another meaning - the ability to create your own document structure, i.e. text fields, images, videos, etc. all structured in a single document.



          Oh yes, I would like to find out more about how to make custom document structure, or to be exact, how to make custom input forms visible in manager... Or the only way is to make a module? Anyone having ideas? Help! undecided
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That’s what TVs are for. The basic document structure does not change, but you can add all the TVs for additional content items/blocks that you want.
              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
              • 25465
              • 8 Posts
              Quote from: sottwell at Mar 13, 2007, 04:44 AM

              That’s what TVs are for. The basic document structure does not change, but you can add all the TVs for additional content items/blocks that you want.

              Yes, but what about listing all those items in a list? I mean for example when having Users database, I want to have input form to create/edit users and in the front-end I would like to list them in a table showing not only title, but custom content too ... Is it possible to achieve with TVs? If yes, so how?

              I am used to CakePHP and it’s MVC aproach, so it is quite hard to wrap my head around this new TVs, chunks concept rolleyes
                • 8960
                • 150 Posts
                I’ve had a few VERY lengthy discussions with a coworker about Custom Content Types within MODx. When he came up with, and I tend to agree, is that true Custom Content Types are not currently supported in MODx and it is unclear if it will be in future (read 1.0) versions of MODx, keeping in mind that MODx is moving to an Object Oriented model.

                I tried arguing the TV point, which closely resembles Custom Content Types, and I even created a TV tutorial to explain my point (which I posted here), but I realized MODx doesn’t handle true Custom Content Types like other CMS’s like Plone or OpenCms.

                Note, the custom content types defined in the documentation in MODx and also within the configuration of MODx (in the manager) incorrectly refer to this. These are all Custom MIME Types which sirlancelot referred to and not Custom Content Types.
                  • 22303 MODX Staff
                  • 10,725 Posts
                  I’m missing the major delta in these semantics. What is the difference between content types and MIME types? They describe the kind of content that is returned from a MODx document (or view) request. You can use MODx page structure/templates/TV’s to model things that make sense as page structures, and that can return HTML, XML, Javascript, images, CSS, whatever, OR you can use a custom scripts (snippets/plugins/modules) to access custom data models (i.e. not page structures). This is exactly what xPDO is addressing, the ability to easily create and manage custom data models and make use of them within the MODx framework, but that is still above and beyond the management of web site resources which are represented in, organized by, and served by MODx.

                  When we talk about content in MODx, we talk about web content or resources that are served (statically or dynamically) by a web server. What others seem to be calling content here, I consider the data model that is to be dealt with by a web application with specific requirements. There is absolutely a difference, as the former is optimized for delivering web resources, and the latter is focused on modeling more complex data with it’s own inter-relationships.
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Yeah, this simple uneducated grandma doesn’t get it... a "type" is like html, plain-text, css, etc, right? We are working within the context of the WWW, which has certain terms that are used within that context. Can we try not to mix contexts and terminology?

                    Like a "resource" is anything that the browser can request to make up its page display with, hence the "URL", "Uniform Resource Locator". We are trying to modify the MODx terminology to more closely conform to standard WWW meanings for the terms we use, and not re-use these terms in a MODx-specific way, which can be confusing.

                    Perhaps if you could define your meaning of "Custom Content Type"?
                      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
                      • 25465
                      • 8 Posts
                      I agree, we misnamed data models. Talking about them, what would be the best approach to create custom data models within MODx? I guess it is possible to use TVs and chunks for that purpose, but what about returning custom data from database? is Ditto able to do list and process chunks having TVs? Or is there another, better approach?