We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14455
    • 14 Posts
    I’m Newbe trying to create a template were I have two or more "Content fields" on the same template.
    and I want to be able to updating the different "Content fields" with the QuickEdit future. I can’t figure out how to do this maybe I just don’t understand the terminology around ModX or maybe it’s not possible? huh
      • 10487 MODX Staff
      • 1,535 Posts
      Hi Johan,

      Template variables are what you need smiley

      Set up the required Template Variables (under ’Manage Resources’ in the manager) and assign them to your template. When you set them up, you can select ’Rich Text’ as the type.

      Remember to add the TV tags in your template for them to be visually displayed on your page - using a similar call to:
      [*#myContentField*]

      (the # means you will get a button displayed on the page just like the ’Edit Content’ button when using QuickEdit)

      It’s that simple smiley

      Have fun,

      Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 14455
        • 14 Posts
        I was experimenting a bit with Template Variables but it didn’t work for me

        I got the error code:

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - Table ’cms_site.s_’ doesn’t exist »
        ;

        Parser timing
        MySQL: 0.0005 s s(4 Requests)
        PHP: 1149513627.6512 s s
        Total: 1149513627.6517 s s

        searched the forum and found this post
        http://modxcms.com/forums/index.php/topic,4363.0.html

        I applied the changes to editor.class.inc.php and added the fields in the database and now it working fine . I don’t know if this is the way to do it or not? Should be interesting to know how others solved this issue.

        Thank you Garry for your fast reply // johan
          • 14455
          • 14 Posts
          I don’t getting now where with this "Several QuickEdit on the same template project" The QuickEdit fields working now but it is some details I really don’t like.

          1. Now I have the button text Edit1, Edit2, Edit3 and so on. I just want all field to have one button called Edit. That’s it!

          2. I want the background which appear then you move the mouse over the QuickEdit button to only cover the content of that field.
          As it is now the different "QuickEdit fields overlapping each other.

          Someone how have been dealing with this things or know how to get it looking good?

            • 7455
            • 2,204 Posts
            maybe you need to start hacking the quick edit plugin en module

            1- It does what it should do give a button "edit:name of the field/tv"
            2- the background will be as big as your div (or other block element) is that you created for the content/tv/titel/etc
            when you have a field insite a field in your source than this is how it should work
              follow me on twitter: @dimmy01
              • 14455
              • 14 Posts
              1. I personally think it should make more sense if the buttons had the description of the template variables and not the variable name. Anyway I haven’t found a way to hack this. But I realised that the way QuickEdit work here on the forum suit my needs much better. I found one forum post about this and suppose it is better I continue to post in that forum thread so it don’t get to messy here. You are more than welcome to join me there smiley
              http://modxcms.com/forums/index.php/topic,2448.msg16825.html#msg16825

              2. Yes it is actually working if you know how to write proper CSS code.
              Thank you Dimmy