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,


    with that said, can you tell me how i can generate the drop-down tvs (with all the available values for the tv) on my custom front-end form (just as you have accomplished with tvExplorer? i can’t seem to find an explanation in the forums on how to do this. if it matters, my tv’s that i am using in my form are @CHUNK bindings.

    There is no built-in olution in Modx, you have to code the necessary function. I have based tvExplorer forms elements on the MakeForm Class.
    tvExplorer supports @BINDINGS.
    The Modx function for @BINDINGS are in tmpvars.commands.inc.php (AFAIR)



    once more question about tvExplorer for my future knowledge. can it also incorporate search on a standard document variable like ’pagetitle’ (ie. have a search form with pagetitle, TV1 and TV2)?

    At this time you cannot bound the serach to only one field of the site_content table.
    tve.keywordsSearch is the tag you need to create a text field. If this input is filled tvexplorer will execute a modified version of Ajaxsearch.
    You could change some of the code to limit the query to fields passed as parameters in the tags

    [+tve.keywordsSearch:excludeTVs->all:fields->pagetitle+]

    excludeTVs already exists and restrict the serach to document field,
    field params has to be added to the existing features.

    If you could give me more informations about your needs I could look if I can help.

    :-)
      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
      • 25483
      • 741 Posts
      I just get all results when I do a search, I used this codes:
      [[tvExplorer? &dittoName=`Ditto` &formTPL=`ZoekFietsForm` &dittoSnippetParameters=`debug:1|parents:2|summarize:5|tpl:ditto_producten|paginate:1|extenders:summary|paginateAlwaysShowLinks:1|truncText:Lees verder|truncLen:200|dateFormat:%d-%m-%Y|language:nederlands`]]
      [+tve.searchForm+] 
      
      nb documents: [+total+] 
      [+tve.dittoList+] 
      U bekijkt [+start+] - [+stop+] van [+total+] gevonden fietsen 
      
      Navigatie
      [+previous+] [+pages+] [+next+]


      FormTPL:
      <form action="[~[*id*]~]" method="get" >
      <fieldset>
      [+tve.productomschrijving:type->text:filter->7+]
      <br />
      [+tve.opmerkingen:type->text:filter->7+]
      <br />
      [+tve.prijs:filter->7+]
      <br />
      [+tve.leeftijd:filter->7+]
      <br />
      <input type="submit" name="search" value="Search" />
      </fieldset>
      </form>


      Real types:
      productomschrijving, opmerkingen: textarea
      prijs: number
      leeftijd: text

      What did I do wrong? It looks like it doesn’t filter anything.

      Ditto debug gives me this:
      dateFormat %d-%m-%Y 
      debug 1 
      dittoName Ditto 
      dittoSnippetParameters debug:1|parents:2|summarize:5|tpl:ditto_producten|paginate:1|extenders:summary|paginateAlwaysShowLin ks:1|truncText:Lees verder|truncLen:200|dateFormat:%d-%m-%Y|language:nederlands 
      extenders summary 
      formTPL ZoekFietsForm 
      language nederlands 
      paginate 1 
      paginateAlwaysShowLinks 1 
      parents 2 
      save 2 
      summarize 5 
      tagData productomschrijving,opmerkingen,prijs,leeftijd 
      tagDelimiter , 
      tpl ditto_producten 
      truncLen 200 
      truncText Lees verder 
      


      I don’t see the "filter" parameter, where does it go??
        with regards,

        Ronald Lokers
        'Front-end developer' @ h2o Media

        • 11975
        • 2,542 Posts
        Hi,

        I guess this is because of the summary extenders.
        It overwrites the inclusion of tvefilter.extender
        The snippet code needs to be changed to deal with this parameter.
        This was on my todo list but I have no free time at the moment to fix it.

        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 25483
          • 741 Posts
          Quote from: heliotrope at Jan 31, 2008, 07:02 AM

          Hi,

          I guess this is because of the summary extenders.
          It overwrites the inclusion of tvefilter.extender
          The snippet code needs to be changed to deal with this parameter.
          This was on my todo list but I have no free time at the moment to fix it.

          :-)

          Confirmed!

          It works without the extender smiley
            with regards,

            Ronald Lokers
            'Front-end developer' @ h2o Media

            • 25483
            • 741 Posts
            The TV "prijs" doesn’t show up if I use this code:
            <form action="[~[*id*]~]" method="get" >
            [+tve.productomschrijving:label->Productomschrijving:type->text:filter->7+]
            <br />
            [+tve.opmerkingen:label->Opmerkingen:type->text:filter->7+]
            <br />
            [+tve.prijs:#RANGE{tvtype->dropdown:filter->3:elements->@Chunk ZoekFietsPrijs:label->Prijs van||tvtype->dropdown:elements->@Chunk ZoekFietsPrijs:label->tot:filter->4}+]
            <br />
            [+tve.leeftijd:#RANGE{tvtype->dropdown:filter->3:elements->@Chunk ZoekFietsLeeftijd:label->Leeftijd van||tvtype->dropdown:elements->@Chunk ZoekFietsLeeftijd:label->tot:filter->4}+]
            <br />
            <input type="submit" name="search" value="Zoeken" />
            </form>


            the TV "leeftijd" is shown correctly, so I think it is a bug with the RANGE parameter?

            It starts to show the TV "prijs" if I remove this from the above code:
            [+tve.leeftijd:#RANGE{tvtype->dropdown:filter->3:elements->@Chunk ZoekFietsLeeftijd:label->Leeftijd van||tvtype->dropdown:elements->@Chunk ZoekFietsLeeftijd:label->tot:filter->4}+]


            How can I get them both working?
              with regards,

              Ronald Lokers
              'Front-end developer' @ h2o Media

              • 11975
              • 2,542 Posts
              The parser in this version is not very evolved smiley

              I’m sure there was a fix for this error but cannot find it any more.

              Will try to find it later, quite busy at this time

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 25483
                • 741 Posts
                Quote from: heliotrope at Jan 31, 2008, 09:23 AM

                The parser in this version is not very evolved smiley

                I’m sure there was a fix for this error but cannot find it any more.

                Will try to find it later, quite busy at this time

                :-)

                Found it!

                http://modxcms.com/forums/index.php/topic,16455.msg109886.html#msg109886

                It’s working fine now laugh
                  with regards,

                  Ronald Lokers
                  'Front-end developer' @ h2o Media

                  • 23506
                  • 156 Posts
                  Hi, my call is
                  [[tvExplorer? &dittoName=`Ditto` &formTPL=`formVin` &dittoSnippetParameters=`tpl:nn|summarize:30|debug:1|paginate:1|depth:5|startid:8`]] 
                  [+tve.searchForm+]
                  nb documents: [+total+]
                  [+tve.dittoList+]
                  
                  Page [+currentPage+] of [+totalPages+]
                  
                  [+previous+] [+pages+] [+next+]


                  Form template:
                  <form action="[~[*id*]~]" method= "get" >
                  <input type="hidden" name="id" value="[*id*]" />
                  <fieldset>
                  [+tve.real_more:filter->9+]
                  </fieldset>
                  <fieldset class="sendForm" >
                  <input type="submit" name="search" value="Search"/>
                  </fieldset>
                  </form>


                  I have this result:
                  nb documents:  Open Debug Console
                   Save Debug Console
                  
                  
                  No documents found.
                  Page of

                  I have document in a folder-id=8
                  The debug console doesn’t work
                  http://localhost/index.php?id=1&real_more=100&search=Search

                  MODx 0.9.6.1
                  Ditto 2.0.2
                  utf8

                  thanks!
                    • 33372
                    • 1,611 Posts
                    I’ve never tried using the Ditto debug console via tvEditor. It might work, but I wouldn’t necessarily expect it to. The Ditto debug console only works when the snippet call is uncached also.
                      "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
                      • 9250
                      • 6 Posts
                      okay, trying to do my ajax search for "objects"/documents with tvExplorer, but how? okay some informations for you: at the moment i only need three tv’s (ImmoPreis, ImmoType and ImmoAreaTotal). the frist problem beginns with ImmoType, at one search i don’t need all possible values because thats only a category internal search.

                      should i post my tvExplorer call? okay, here it is:
                      [b][*sidebar*] (tv)[/b]
                      [[tvExplorer? &formTPL=`tveSearchGrundstuecke` &dittoName=`Ditto` &dittoSnippetParameters=`tpl:ListGrundstueckeDefault|parents:19|display:25|paginate:1` &showRs=`true`]]
                      [+tve.searchForm+]


                      in the content of the specific document i’ve the placeholder [+tve.dittoList+], yeah, so far that works but: the result of the list should not be shown after sending the request, first it should only count how many "objects"/documents are found under the search-form. theres a button wich can be pressed to list the results.

                      okay, now it’s ur turn: how can i do this trick?