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

    As far as I remember there is no easy way to go with ajax and tvExplorer on the front end by using index-ajax.php.
    As the tvs used are in the form tpl you ’ll have to write the same call as in your document in another one with a blank template.
    After the call, do not insert the form placeholder [+tve.searchForm+] (unless the ajax stuff makes the form disappears on submit).
    In your 1st call, make the action form point to the document with the blank template or in the js if you want the form works with js disabled.

    For the js part you can use any lib you wish.
    To insert the js you can use the jScript param (check the exact param name in the snippet code.

    Hope that make sense.

    :-)

      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
      • 4749
      • 623 Posts
      I’m building a directory of people (names, addresses, phone numbers, cities, states, etc.) if I’m using weblogin to create a directory can I use tvexplorer to search through the names? Also, I’d like to have sponsored links show up at the top of the results. Is any of this possible with tvExplorer?

      Also, any news on the new version? Do you expect to have the new version soon? Thanks Heliotrope.
        The MODx has you...
        Utah Web Design
        • 33372
        • 1,611 Posts
        tvExplorer will allow you to search through TV fields as long as you set them up properly, so as long as you save your data to TVs I can’t see why this wouldn’t work. The output is generated by Ditto, so you can template that however you like. You can put whatever you like around your results, including sponsored links (if you need Ditto placeholders to make these relevant, just make sure that your Ditto templates include this info).
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 4749
          • 623 Posts
          Thanks ZAP. I guess the better question would be how do I promote the sponsored link to the top every time? For example: If someone searches the directory for people in Los Angeles, California and there are three sponsored links from Los Angeles and 30 other results - how do I make sure that the three sponsored people show up at the top. Is there a weighting method applied to tags that I can use to promote?

          Also, could this be possible to use with weblogin? Could I create a tv checkbox that would allow me to go through the directory and "check" each sponsored listing?
            The MODx has you...
            Utah Web Design
            • 33372
            • 1,611 Posts
            Oh. I see what you mean. You want to append the sponsored links to the same list.

            I think you can do that just with Ditto templates (you may find that a second Ditto call to just extract and display three sponsored links above your regular results is the easiest solution).
              "Things are not what they appear to be; nor are they otherwise." - Buddha

              "Well, gee, Buddha - that wasn't very helpful..." - ZAP

              Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
              • 4749
              • 623 Posts
              If I understand what you’re telling me is I can use one tvExplorer call with separate ditto calls to achieve my goals? So, I guess by filtering the results with the Ditto calls I can get sponsored results and all the other results from the same search? Thanks, ZAP.
                The MODx has you...
                Utah Web Design
                • 26931
                • 2,314 Posts
                Hi,

                would it be possible to set the values for two dropdown-lists for a search in relation to each other? for example, i choose a country in the first dropdown, and the second dropdown will then show me just the options for that specific country...?

                best regards, j
                  • 11975
                  • 2,542 Posts
                  Hi,

                  well at this time, I don’t see any easy way to achieve your request.

                  Creating hierachy relationship beetween tv is impossible so it would have to be managed in dedicated tables.
                  As @BINDING is supported in tve chunk form you could get the options values from the table but the related datas for each options value should have to be written either in the <script> tag or requested through ajax.

                  I haven’t yet found how to achieve this in a generic way.

                  Hope that makes sense.

                  :-)

                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 33372
                    • 1,611 Posts
                    Actually, you can do this using Javascript now. You can pass an onchange event to your country menu by using
                    [+tve.country:filter->9:label->Country:tvtype->dropdown:onchange->dowhatever():blankLabel->- All -+]
                    in your form chunk and just include the Javascript you need in the template head. You could also create your form manually (without using tvE to create the menus and options) and tvE could still display the results.
                      "Things are not what they appear to be; nor are they otherwise." - Buddha

                      "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                      • 11975
                      • 2,542 Posts
                      I guess it wouldn’t work.
                      For security reasons, tvexplorer will not take care of values from POST or GET that are not part of the chunk form (i.e tve tags).
                      So you’ll have to write a tve tag for the second dropdown.

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