We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    AFAIK, Ditto only works on documents. But this snippet idea I have would need to work on chunks...

    I have a website devoted to a RPG series. And I have data on the various monsters, equipment, items, etc. Each entry is done by chunks, and added to the document via the "TV as chunks" (you know, that snippet that allows chunks to be selected via checkbox system in a TV --- it’s on the Wiki IIRC), so I can show an item’s data in a Walkthrough page, as an example.

    Now, wouldn’t having a search page that can search for monsters that have X item be neat? This snippet I want to create would need to look in a specific category (let’s say rpgMonsters), and then check the chunks for "Item X". If "Item X" exists for any of those chunks, this snippet would output them.

    Before I even begin trying to code this --- is this feasible in MODx? (Only because I could see many other people having some use for this type of snippet. smiley )

    (Sorry if that was kinda hard to follow --- this is a semi-complicated snippet idea.)
      My Snippets
      -> PopUpChunk v1.0
      • 10449
      • 956 Posts
      I don’t think this would be hard to do.

      If you open up phpMyAdmin, take a look at the tables "categories" + "site_htmlsnippets".
      Just create a DB-query that searches / lists those chunks in whatever way you need.

      btw, where’s that "TV as chunks" Wiki article? I can’t remember that one...
        • 28033
        • 925 Posts
        Quote from: ganeshXL at Jan 11, 2008, 10:36 PM

        I don’t think this would be hard to do.

        If you open up phpMyAdmin, take a look at the tables "categories" + "site_htmlsnippets".
        Just create a DB-query that searches / lists those chunks in whatever way you need.

        btw, where’s that "TV as chunks" Wiki article? I can’t remember that one...

        That’s how I was thinking of going about doing it. Well, in any case, it’s good to know that approach is possible.

        http://wiki.modxcms.com/index.php/Create_TV-Based_Chunks

        And that’s the article I was refrencing.
          My Snippets
          -> PopUpChunk v1.0