We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33360
    • 3 Posts
    Split from [Tutorial] Results Per Page Form Dropdown

    Hello

    I have used this code to display my cities dropdown.
    Now my problem is >>
    when I submit the page after selecting the city.
    it will redirect to another page and URL something like this >>
    "index.php?id=76&ditto_summarize=Melbourne"

    So on this ( New ) page, how can I use "ditto_summarize" variable in my snippets called Ditto.
    Or has modx any another solution ?

    Please give me solution asap. I need asap.

    Thanks
    Zangsdev
      • 24981
      • 109 Posts
      Zangsdev above has been helping me on a site. Let me explain further:
      1. This site displays a number of Events in different cities.
      2. We have created a page for each Event, including a TV called [*EventCity*] that allows the Admin to set the City where the event is held.
      3. On the front end we want the Visitor, to be able to select from a dropdown of cities, so they can just see the Events in their City.
      4. So we have created a form - using similar code to this one, to append a variable value to the URL eg &ditto_summarize=Melbourne
      5. What we don’t understand is how to use that variable within Ditto on the same page. For example we want to use Filter or Tags to just show Events tagged where [*EventCity*] is set to Melbourne.

      Does the name of variable matter? eg. &ditto_[name]? If so should this be &ditto_tags to set tags parameter etc
      Is there anything else that needs to go in the Ditto parameters?

      It seems from the use in this tutorial
      [!Ditto?  &parent=`29` &extenders=`request` paginate=`1`!] 
      the only requirement is to use
      &extenders=`request` 


      I’ve checked the documentation and also the unofficial documentation from Bill but the usage is not clear. Any assistance would be appreciated.

      RicardosanX
        • 11975
        • 2,542 Posts
        Hi,

        I will release in next days tvExplorer which will allow you to create such form very easily.

        Here is an example of a tvExplorer form

        http://www.deco-in.com/recherche-avancee

        You just have to set as param the TVs you wish to display.
        (You can also allow full text search and bound the search to a specific parent)

        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 24981
          • 109 Posts
          Sounds fantastic. I did look at sneak preview smiley and waiting eagerly...

          If anyone can help with Request extender please let me know.

          ricardosanx
            • 18397
            • 3,250 Posts
            You would want to pass &ditto_filter in the URL with the value:

            EventCity,[+city+],2
            


            Where you would replace [+city+] with the city you would like to show (case sensitive).