We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    This is an auto-generated topic for SimpleSearch 1.0.0-pl by splittingred.

    Brief Description:

    A simple search solution for MODx Revolution. Loosely based on AjaxSearch for Evolution (minus the ajax). Only searches Resources; does not search dynamic content.

    • Now searches unprocessed TVs
    • Added customPackages property for searching custom packages
    • Added fix for GET searches
    • Fixed bug where contexts param was causing blank output results
    • Fixed bug with separators doubling
    • Fixed bug with perPage not being respected due to shared object instance
    • Added Russian translation

    See the official documentation here:http://svn.modxcms.com/docs/display/ADDON/SimpleSearch/
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 2328
      • 39 Posts
      (I’m sorry if I’m going about reporting this the wrong way, but I’m reluctant to sign up to a new service to report 1 bug!)

      I’ve just installed this and it’s working very nicely, but there’s one minor issue. The currentPageTpl (and I suspect the pageTpl) property setting doesn’t appear to be working.

      I think it’s to do with the way it’s being assigned in getPagination (line 286) - shouldn’t it be assigned from $this->config? Changing this line seems to fix it, so I’ve done that as a local change for my system.

      I’m intrigued by the concept of the custom packages property and looking forward to finding out more. An earlier incarnation of my site had a customised version of FlexSearchForm that included comment and maxigallery metadata searching so I’ll be interested to find out how it’s done here.

      Jon
        • 15162
        • 59 Posts
        My problem is related to the &tpl call. Without it everything works fine, but when using it &landing does not work. I used the "default tpl" found in the Wiki. When I compared the source code of my call without and with the &tpl call I found one input tag that was missing from the default tpl from the Wiki:
        <input type="hidden" value="*id of landing page*" name="id" />


        After I added this line in my custom template everything worked fine.

        SS call:
        [[!SimpleSearchForm? &landing=`5` &tpl=`search_formTpl` ]]


        Revo 2-pl
          • 30319
          • 406 Posts
          Can anyone suggest why I cannot style the search form??

          I have this code:

          [[!SimpleSearchForm? &landing=`123` &toPlaceholder=`search.form`]]
          <p style="margin-top:1.2em;">[[+search.form]]</p>

          The paragraph containing the form will not "move down" regardless of whether I use margin-top or padding-top.

          The generated HTML looks like:

          <p style="margin-top:1.2em;"><form class="sisea-search-form" action="search-results" method="GET">
          <input type="hidden" name="id" value="26" />
          <label>
          <input type="text" name="search" value="" />
          </label>

          <input type="submit" value="Search" />
          </form></p>

          I do not know if this is a bug or not...I also tried using in my stylesheet:

          .sisea-search-form {
          text-align: center;
          padding-top:1.2em;
          margin-top: 1.2em;
          border:1px solid red;
          }

          Is this a bug or am I using CSS incorrectly or what??

          Hopefully someone can reply, meanwhile I will try hacks or whatever to get whitespace above the search form.

          Thank you, Tom


            • 9207 ☆ A M B ☆
            • 2,475 Posts
            Where do we file bugs for this?

            It seems that with version 1.0.0 of the SimpleSearchForm, if you really do have a Chunk named "searchForm" that its contents are ignored (note the capitalization). You have to name your chunk something else, e.g. "mySearchFrom" in order for its contents to be read correctly.

            I looked at the Snippet code, but I don’t understand enough about the Revo API to diagnose it... but it’s almost certainly this line:
            $tpl = $modx->getOption('tpl',$scriptProperties,'SearchForm');


            Is the problem that I have a chunk named "searchForm" (lowercase "s")?

            Whatever is going on, when my &tpl chunk is named ’searchForm’, its contents are not used for generating the search form.
              • 29549
              • 10 Posts
              G-Day,

              Is it possible to seek context-independent with SimpleSearch
                • 4619
                • 23 Posts

                What is the meaning of useAllWords parameter ?

                In a document which contains "web development services", If I search "web development services", I got a result. But If I search "web services", I got no results.

                Is it a search of the exact phrase or a search of documents which contains all the words ?
                  • 31255
                  • 118 Posts
                  Ok, start to use simple search in revo. BUT outputted code isn`t valid (W3C validator). Method is GET, it should be get. Where I can change these? I changed it on lexicon and snippet properties, BUT no change in output.

                  UPDATE: I changed it with: &method=`get` It works, but I think it should be valid in base configuration.

                  And default searchform.chunk.tpl does not output valid when using strict xhtml. Here`s one which passed validator:
                  <form class="sisea-search-form" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
                      <div><input type="hidden" name="id" value="[[+landing:default=[[*id]]]]"/> 
                      <input  class="searchfield" type="text" name="[[+searchIndex]]" value="[[+searchValue]]"/>
                      <input type="submit"  alt="Search"  title="Search" class="button" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]"/></div>
                  </form>


                  Note that inputs are now inside div tag.


                    Tassu, webmaster of Valokammi
                    • 5340
                    • 1,624 Posts
                    Hi valokammi,

                    Hopefully I got your question correct. Have a look here: http://rtfm.modx.com/display/ADDON/SimpleSearch.SimpleSearchForm.tpl

                    Create a new chunk FormItTpl paste your code and add &tpl=`FormItTpl` to the FormIt call