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

    I use this call

    [[tvExplorer? &dittoName=`Ditto`&formTPL=`zoektest`&dittoSnippetParameters=`tpl:zoektest|summarize:30|debug:0|paginate:1|depth:5|parents:0`]]
    [+tve.searchForm+]
    <h3>nb documents: [+total+] </h3>
    <div id="ditto_list" > [+tve.dittoList+] </div>
    <p class="ditto_pagination">Page <strong> [+currentPage+] </strong> of <strong> [+totalPages+] </strong></p>
    <p class="ditto_pagination"> <span id="ditto_pages" > [+previous+] [+pages+] [+next+] </span></p>


    and this form

    <form action="[~[*id*]~]" method="get">
    <fieldset>
    [+tve.keywordsSearch:includeTVs->all:label->trefwoord+]
    </fieldset>
    <fieldset>
    [+tve.Name:filter->9+]
    </fieldset>
    <fieldset>
    [+tve.categorie:filter->9:blankLabel->-+]
    </fieldset>
    <fieldset>
    [+tve.Color:filter->9+]
    </fieldset>
    <fieldset class="sendForm" >
    <input type="submit" name="search" value="search" />
    </fieldset>
    </form>


    And get redirected to another page constantly.
    Any ideas before I practice ’laptop throwing’?  >:(

    thx  wink
      • 11975
      • 2,542 Posts
      Hi,

      If FURLS are off, you have to add an hidden input in your chunk form

      <input type="hidden" name="id" value="[*id*]" />


      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 20054
        • 21 Posts
        Quote from: heliotrope at Nov 14, 2007, 07:55 AM

        Hi,

        You must keep the [+tve.dateElt+]
        This is a special tag as parentElt.

        [+tve. dateElt:name->minFloorSize:source->FloorSize:label->Size between:type->text:filter->3:size->10:maxlength->10+]

        :-)

        I now have
              [+tve.dateElt:name->minFloorSize:source->FloorSize:label->Size between:type->text:filter->3:size->10:maxlength->10+]
              [+tve.dateElt:name->maxFloorSize:label->and :source->FloorSize:type->text:filter->4:size->10:maxlength->10+]
        


        And it displays fine, however if I enter any values in those boxes, the search doesn’t find anything.

        Is there a "special" thing like tve.dateElt that doesn’t deal with dates? It doesn’t seem to apply to this situation - perhaps I should explain better? tongue

        I have a list of house plans that people can browse. These house plans have various details like no of bedrooms, storeys and floor size in m2. Most of my filters are working great (thanks!), but I want to let the user enter the minimum and maximum floor sizes they want.
          • 17062
          • 10 Posts
          probably again a simple solution, but I’m afraid I got stucked again.
          <form action="[~[*id*]~]" method="get">
          <input type="hidden" name="id" value="[*id*]" />
          <fieldset>
          [+tve.keywordsSearch:includeTVs->all:label->trefwoord+]
          </fieldset>
          <fieldset>
          [+tve.templatevar1:filter->9:blankLabel->-- all --+]
          </fieldset>
          <fieldset>
          [+tve.templatevar2:filter->9:blankLabel->-- all --+]
          </fieldset>
          <fieldset class="sendForm" >
          <input type="submit" name="search" value="search" />
          </fieldset>
          </form>


          If all selectboxes are left blank, I get all the resultpages. If I select either tv1 or tv2 no documents are found.
          if I only fill in the keywordsearch field I get the proper results.......

          heliotrope show your magix  wink

          btw, I see this in my HTML source although I have 4 records found ...
          <?
          // Use the following syntax $param = 'value';
          ?><p>No documents found.</p>
          
            • 11975
            • 2,542 Posts
            Quote from: moebius at Nov 14, 2007, 08:26 PM

            Quote from: heliotrope at Nov 14, 2007, 07:55 AM

            Hi,

            You must keep the [+tve.dateElt+]
            This is a special tag as parentElt.

            [+tve. dateElt:name->minFloorSize:source->FloorSize:label->Size between:type->text:filter->3:size->10:maxlength->10+]

            :-)

            I now have
                  [+tve.dateElt:name->minFloorSize:source->FloorSize:label->Size between:type->text:filter->3:size->10:maxlength->10+]
                  [+tve.dateElt:name->maxFloorSize:label->and :source->FloorSize:type->text:filter->4:size->10:maxlength->10+]
            


            And it displays fine, however if I enter any values in those boxes, the search doesn’t find anything.

            Is there a "special" thing like tve.dateElt that doesn’t deal with dates? It doesn’t seem to apply to this situation - perhaps I should explain better? tongue

            I have a list of house plans that people can browse. These house plans have various details like no of bedrooms, storeys and floor size in m2. Most of my filters are working great (thanks!), but I want to let the user enter the minimum and maximum floor sizes they want.

            Hi

            I thought that you had to search on tv which type was date.
            In your case you don’t need dateElt
            Just use the regular tag
            [+tve.tvName:param->value+]
            [+tve.maxFloorSize:filter->3+]

            :-)
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 11975
              • 2,542 Posts
              Quote from: LF8 at Nov 14, 2007, 08:48 PM

              probably again a simple solution, but I’m afraid I got stucked again.
              <form action="[~[*id*]~]" method="get">
              <input type="hidden" name="id" value="[*id*]" />
              <fieldset>
              [+tve.keywordsSearch:includeTVs->all:label->trefwoord+]
              </fieldset>
              <fieldset>
              [+tve.templatevar1:filter->9:blankLabel->-- all --+]
              </fieldset>
              <fieldset>
              [+tve.templatevar2:filter->9:blankLabel->-- all --+]
              </fieldset>
              <fieldset class="sendForm" >
              <input type="submit" name="search" value="search" />
              </fieldset>
              </form>


              If all selectboxes are left blank, I get all the resultpages. If I select either tv1 or tv2 no documents are found.
              if I only fill in the keywordsearch field I get the proper results.......

              heliotrope show your magix wink

              btw, I see this in my HTML source although I have 4 records found ...
              <?
              // Use the following syntax $param = 'value';
              ?><p>No documents found.</p>
              



              Hi

              about the

              <?
              // Use the following syntax $param = ’value’;
              ?>

              change the first <? to <?php in one of the .format in ditto format folder.
              That’s weird that you get this in your html.

              Could you please post a screenshot of the ditto debug, especially the filter tabs once you’ve selected a value in tv.
              Change in your call debug:1

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 11975
                • 2,542 Posts
                @moebius

                rereading your post I guess you need the #RANGE method

                In your case, as far as I understand, each property has a dimension (sorry if it’s not the good word) stored in a unique tv

                So

                [+tve.tvFloorSize:#RANGE{tvtype->text:filter->3:label->min Size||tvtype->text:label->max size:filter->4}+]

                Should do the trick

                :-)
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 20054
                  • 21 Posts
                  Quote from: heliotrope at Nov 14, 2007, 10:54 PM

                  @moebius

                  rereading your post I guess you need the #RANGE method

                  In your case, as far as I understand, each property has a dimension (sorry if it’s not the good word) stored in a unique tv

                  So

                  [+tve.tvFloorSize:#RANGE{tvtype->text:filter->3:label->min Size||tvtype->text:label->max size:filter->4}+]

                  Should do the trick

                  :-)

                  You’re a star!! smiley
                  Once this project is completed I’m going to have a bloody good look at how you did this; its great!
                    • 17062
                    • 10 Posts
                    helio, again brilliant!!
                    the problem was the case sensitivity in the TV.
                    now solved
                    thanks! grin
                      • 11975
                      • 2,542 Posts
                      About tvexplorer and widgets.

                      The current code does not support widgets except the delimited list.


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