We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4385
    • 372 Posts
    The best and worst thing about MODx is there are too many ways to things. grin

    I want to create a site that has rates posted throughout the site. Sometimes just one or two on a page, sometimes a whole table of rates to compare. They will be updated weekly. The thing is I want to be able to update them all in one place all at once. Or use a flat file to update them.

    How would you do it in evolution? What would be the best practice?
      DropboxUploader -- Upload files to a Dropbox account.
      DIG -- Dynamic Image Generator
      gus -- Google URL Shortener
      makeQR -- Uses google chart api to make QR codes.
      MODxTweeter -- Update your twitter status on publish.
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      I think you should explain in a bit more detail what you’re trying to do. If it’s a relatively small set of data and a flat-file CSV would suffice, do that and access it via a Snippet on as many pages as you need. If it’s more complicated, you may want to set up a database table or hold the data and then use a module (e.g. phpMyEdit or the dbEdit module) to access it via the manager.

      I don’t think there’s any standard way of doing this...
        • 4385
        • 372 Posts
        I really don’t want the client to have to remember to put the snippet into each page, and it is overkill to include it on every page of the site. I will have a look at the database editing modules and see if I can use that. I am thinking I could create chucks and assign them to a specific topic like "dynamic" (category_id 5 for example) and have the editor modify only those records.

        {{36_month_used_car}}
        {{48_month_used_car}}
        {{60_month_used_car}}

        Then I could use them all over the site.
          DropboxUploader -- Upload files to a Dropbox account.
          DIG -- Dynamic Image Generator
          gus -- Google URL Shortener
          makeQR -- Uses google chart api to make QR codes.
          MODxTweeter -- Update your twitter status on publish.
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          Now I’m even more confused on what you’re trying to do.
            • 4385
            • 372 Posts
            I wanted to come up with a way that the client could put "placeholders" throughout the site.

            For example...

            The rates for new cars are as low as {{60_month_new_car}}. We have great rates on loans, check them out below.

            36 month new car rate {{36_month_new_car}}
            48 month new car rate {{48_month_new_car}}
            60 month new car rate {{60_month_new_car}}

            36 month used car rate {{36_month_used_car}}
            48 month used car rate {{48_month_used_car}}
            60 month used car rate {{60_month_used_car}}

            I don’t want to use traditional chunks, because it would take to long to edit 27-30 chunks each week when new rates are available. It would be much easier to update them on one page. I did not want to force the client to enter data in like this "4.15|4.25|4.0" and include a snippet to parse the the data or set placeholders.
              DropboxUploader -- Upload files to a Dropbox account.
              DIG -- Dynamic Image Generator
              gus -- Google URL Shortener
              makeQR -- Uses google chart api to make QR codes.
              MODxTweeter -- Update your twitter status on publish.
              • 3749
              • 24,544 Posts
              For Evolution, it sounds like it might be a job for eForm and eForm2DB.
                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
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                Would it be too much to ask the client to use a Snippet, e.g.

                [!dbLookup? category=`36_month_new_car`!]


                That’s not too much different from interspersing Chunks throughout the site, but it’d be much easier to write a Snippet to handle that kind of lookup, no matter what the source of the data.
                  • 20413
                  • 2,877 Posts
                  GetField!
                  Make one document store TVs and call them from eleswhere!
                    @hawproductions | http://mrhaw.com/

                    Infograph: MODX Advanced Install in 7 steps:
                    http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                    Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                    http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                    • 4385
                    • 372 Posts
                    Quote from: mrhaw at May 03, 2010, 06:42 PM

                    GetField!
                    Make one document store TVs and call them from eleswhere!

                    I forgot all about that! I made PHx modifier that did the same thing.

                    http://wiki.modxcms.com/index.php/PHx/CustomModifiers#phx:docfield

                    document 10 has all the TVs stored
                    [+phx:input=`10`:docfield=`36_month_new_car`+]
                    [+phx:input=`10`:docfield=`48_month_new_car`+]
                    [+phx:input=`10`:docfield=`60_month_new_car`+]


                      DropboxUploader -- Upload files to a Dropbox account.
                      DIG -- Dynamic Image Generator
                      gus -- Google URL Shortener
                      makeQR -- Uses google chart api to make QR codes.
                      MODxTweeter -- Update your twitter status on publish.
                      • 4385
                      • 372 Posts
                      Any ideas which approach would have the least impact on the system?
                        DropboxUploader -- Upload files to a Dropbox account.
                        DIG -- Dynamic Image Generator
                        gus -- Google URL Shortener
                        makeQR -- Uses google chart api to make QR codes.
                        MODxTweeter -- Update your twitter status on publish.