We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22969
    • 158 Posts
    As per the subject, I dont fancy clicking through 140 posts to set the correct article child template, any ideas for a batch fix?

    Thanks
    Brett
      • 4172
      • 5,888 Posts
      within phpmyadmin

      update modx_site_content set template=XXX where parent=YYY


      you need to know the template-id = XXX and the id of the articles-containter (parent) = YYY
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3749
        • 24,544 Posts
        You can also do it with the Batcher extra by selecting the resources and using the Bulk Actions dropdown. You can sort the list by Template first.
          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
          • 22969
          • 158 Posts
          Thanks Guys...

          Come across another issue, seems the export from blogger included "messy" extra code like word code and loads of empty divs etc, so not displaying posts and only half a ones etc on the new website, basically breaking the layout, now, I can open each post, select all and clean formatting, but to do 140+ will take a very long time, is there a way to batch clean all the posts to strip out unneeded/empty code??

          thank you
            • 3749
            • 24,544 Posts
            If it's the exact same code in every resource, you could write a snippet to remove it. Otherwise, I doubt if there's an easy way to remove it.

            You could also write a utility snippet to export the content section of the problem resources to files named after the ID of each resource, edit them in a good editor, then use another utility snippet to re-import them.

              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