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

    Is there a way to have more then one content input field, [*#content*] that is. So IE, you could put; Showtimes: [*#content*] in a template so only the text after that would have to be edited?

    If so does it require editing the DB/php configuration of modx, how difficult?

    Thanks in advance,
    Amazon3d
    Well thanks for solving that one, but now that I have my TVs installed is there a way to make them in order when you go to put stuff in them?
    Eg.
    Quote 1
    Picture1
    Stuff 1
    Quote 2
    Picture2
    Stuff 2
    Quote 3
    Picture3
    Stuff 3
    Quote 4
    Picture4
    Stuff 4
    ---------
    As of now it is like:
    Quote 1
    Picture3
    Quote 4
    Quote 2
    Picture2
    Quote 3
    Picture4
    Picture1
    etc....

    Anyway to bring order to this chaos?
      • 25663 MODX Staff
      • 12,272 Posts
      That’s what TVs are for. http://modxcms.com/template-variables.html
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 1330
        • 79 Posts
        (bump for topic change)
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Yes, go to your template in the Manager, and you’ll see a tab for its template variables. There is a link there for ordering them, and you can just drag/drop them in the order 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
            • 7231
            • 4,205 Posts
            There is a link there for ordering them, and you can just drag/drop them in the order you want.
            Does this also affect the display order in quickedit?
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 25663 MODX Staff
              • 12,272 Posts
              I doubt it, but don’t know honestly. Good question.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Doesn’t appear to. Apparently QuickEdit does not use the "rank" field in the site_tmplvar_templates table. It most likely just loads in the order they are in the table. It shouldn’t be difficult to add a "order by" clause to the query it uses to retrieve them, though.

                Looks like line 141 of assets/modules/quick_edit/contentVariable.class.inc.php is the culprit...
                $templates = $modx->db->select('templatename,id', '`' . $modx->db->config['table_prefix'] . 'site_templates`','','rank');
                

                should do the job, although I haven’t tested this.

                [edit] That will only break your pages when QuickEdit is activated. There is another (proper) fix; I can’t find the post with it again though!

                On line 167 of output.class.inc.php it should be (the last parameter indicates ORDER BY field)
                			$cvs = $modx->getTemplateVars('*', 'id, name', '', 1, 'rank');
                  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
                  • 7231
                  • 4,205 Posts
                  I will give it a try. It would also be nice to have the document variable before the template variables in quickedit. Currently they come after the TVs which is a bit odd, to me at least.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don't know what it is.
                    Do you, Mr. Jones? - [bob dylan]