We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52678
    • 14 Posts
    I create 3 Template Variables (TV). Destination, Activity, and days (place)
    I allowed the TVs for a template and I craete serveral resources. Each ressource is contain en event information and I enter the start and end date and the location because of the TV.

    Let's say, I have 20 event resource.

    I also create a simple form, where I can enter a destination, Activity and a day. When I search, I want to have all event matching the the form criteria.

    I have no idea how to develop the script to extract and list the filtered resource from the MODx database, keeping in mind that we filter TV linked to the needed ressource
      • 3749
      • 24,544 Posts
      Using getResources or pdoResources with the &tvFilters property might do what you want (though perhaps not as fast as a custom snippet).

      If you're processing the form in code, you could use $modx->runSnippet() to run either snippet and get the results.
        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