We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30319
    • 406 Posts
    I have a static HTML site that I want to automate with MODx.
    Sample page: http://shopsonstar.com/porcelain.html
    How should I set up MODx to do the product display following the text preamble??
    Database?? TVs?? What?? Documentation on how to do?? Have not yet received The Book.
    Any/all suggestions will be read.
    Can't really use a shopping cart since the 'Buy Now' buttons redirect to the distributor and this is not subject to change.
    Thank you, Tom
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Mark Hamstra Reply #2, 15 years ago
      Could be done using resources (documents or weblinks) and some TVs (for example a checkbox for "★ Local Artisan"), using getResources with a proper &tpl &tplOdd properties to generate the listing.

      If you can change the HTML slightly, it would help to instead of defining every row with its own class to simply use a float and the tplOdd property to assign the "last" class to the second listing.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 30319
        • 406 Posts
        Hmmm...that's what I was afraid someone would say -- use documents -- I thought it might be doable with a database and chunks to insert the database text into the requisite places in a template...

        Thank you for the tplEven/tplOdd idea for getResources, the row class would be part of the main template...

        Also I'd hoped I could do a random sort order...meanwhile I'll try all this out...

        Wish MODx made it easier to create and display custom database table data.

        Thank you, Tom
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          Mark Hamstra Reply #4, 15 years ago
          You can sort getResources (or most snippets, really) with &sort=`RAND()`. And you do use chunks from database stuff with getResources... wink

          If you want to use custom tables I would advice that, but developing the component to manage it with may take too much time. Your first post almost sounded desperate so I didn't want to push that further. laugh

          A third option I only now think of is using MIGX, which sort of brings the two together in a TV: rtfm.modx.com/display/addon/MIGX. That could actually be what you're looking for as every "category" resource would use that TV, and the products would be in there. There's a few tutorials in the documentation that can help you get some inspiration on how it works.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 30319
            • 406 Posts
            I didn't realize I sounded desperate...eek!! Frustrated at not knowing where to look/do.
            The Book being months late doesn't help either. smiley
            Seems it will be a mix of table, resource, TVs, etc.
            I remember reading of MIGx but I'll look it up again etc.
            Thank you, this is a good start smiley
            Hoping this works because then I could include blog/comments/etc. which is hard to do in static html.
            Thank you, Tom