We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10896
    • 76 Posts
    Hi all,

    I’m working on a site for a university. There will be a set of documents for the faculty each one containing a tv that is the academic department. I want to setup a page that uses ditto to display the faculty but I’d like to put a small dropdown menu at the top that upon selection of a different option will display a different department. I saw that filters will filter out the unnecessary data and then I came across the extenders that allows a results per page drop down to appear:

    http://modxcms.com/forums/index.php/topic,13143.0.html

    Can I modify this to create a dropdown that lists the possible departments and will sort and filter the ditto output? If so is there any tutorial out there for this? Or does anyone have any hints on how I can pull this off?

    Thanks a bunch,
    -bryan
      • 18397
      • 3,250 Posts
      Quote from: gl330k at Jul 25, 2007, 02:59 PM

      Can I modify this to create a dropdown that lists the possible departments and will sort and filter the ditto output? If so is there any tutorial out there for this? Or does anyone have any hints on how I can pull this off?
      Yes, you could modify it do do that. You would want to change the $choix_res_per_page array to hold the different departments in the format ’yourTvName,department’ (or if they change often a call to an api function to get the tv values). Then you would search and replace ditto_summarize with ditto_filter. Also, you might want to look into tvEditor/tvExplorer: http://modxcms.com/forums/index.php/topic,16455.0/topicseen.html
        • 10896
        • 76 Posts
        Mark

        Thanks for the help. I’m fiddling with it now. Why do you recommend tvEditor/tvExplorer. I’m not fully understanding its capabilities.

        Thanks,
        -bryan
          • 11975
          • 2,542 Posts
          Hi,

          tvexplorer is a snippet to create easily advanced search form combining tvs, full text and document tree.
          All you have to do is to write a chunk containing special tags.

          I’ve never tested but you could use the code from soda as a snippet and call it from the form chunk to create the dropdown to select how many items to display in the result list.
          tvexplorer will render the department tv and will build the filters for you

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l