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

    I tried to use AjaxSearch (as normal searching) like this :

    [!AjaxSearch? &ajaxSearch=`0` &jscript=`jquery` &addJscript=`0` &AS_landing=`8` &ajaxMax=`5` &showMoreResults=`1` &moreResultsPage=`8`!]


    1) How to make the result has different background color ?
    Example :
    ------------------ Here has bgcolor of #ffa0ff (light purple) -------------------------
    Black Cat :
    etc ... etc .. etc ...
    Read More >>

    ------------------ Here has bgcolor of #a0ffa0 (light green) -------------------------
    Big Cat (tiger ):
    etc ... etc .. etc ...
    Read More >>

    ------------------ Here has bgcolor of #ffa0ff (purple) AGAIN -------------------------
    Some nice Cat :
    etc ... etc .. etc ...
    Read More >>

    ------------------ Here has bgcolor of #a0ffa0 (green) AGAIN -------------------------
    White Cat jumps over the big dog :
    etc ... etc .. etc ...
    Read More >>

    ---------------------------------------------------------------------------------------

    2) How to make the search view like this : http://www.modx.wangba.fr/

    - has green background at ’go’
    - NO text like : "Search ... Please enter a search term to begin your search."
    - the input form is NOT too wide (may be about 100px).

    I can’t find it here : http://wiki.modxcms.com/index.php/AjaxSearch

    Thanks.
    Best Regards
    - pedma -
      • 22958
      • 50 Posts
      Quote from: pedmajungne at Nov 11, 2009, 10:15 PM


      2) How to make the search view like this : http://www.modx.wangba.fr/

      - has green background at ’go’
      - NO text like : "Search ... Please enter a search term to begin your search."
      - the input form is NOT too wide (may be about 100px).

      I can’t find it here : http://wiki.modxcms.com/index.php/AjaxSearch

      Thanks.
      Best Regards
      - pedma -


      I found it (there is in the Wiki above .... I missed it ... sad... )

      1) Edit file .../assets/snippets/ajaxSearch/templates/layout.tpl.html

      Remove this :
      [+as.showIntro:is=`1`:then=`
      <p class="ajaxSearch_intro" id="ajaxSearch_intro">[+as.introMessage+]</p>
      `+]

      2) Edit your default css file, add this to it :

      #ajaxSearch_input {
      width: 100px;
      ... etc ...etc..

      #ajaxSearch_submit {
      background-color: #00a000;
      .... etc ...etc ...

      Thanks.
      - pedma -