New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • Hello,

    I'm working with modX Evolution 1.0.5

    I'm probably to tired, but I don't know how to make it work : I just want to use my own tpl for the ajaxsearch pagination.

    My code in ajaxsearch landing page
    [!AjaxSearch? &ajaxSearch=`0` &showResults=`1` &showInputForm=`0` &showPagingAlways=`1` &pagingType=`0` &grabMax=`10` &grpResultsDef=`0` &tplPaging=`searchPagingTpl` !]
    


    My chunk 'searchPagingTpl'
    [+as.tpl:is=`paging`:then=`
      <div class="ajaxSearch_paging">
        <span>[+as.pagingText+]</span>
        [+as.pagingLinks+]
      </div>
    `+]
    [+as.tpl:is=`pagingLinks`:then=`
      <a href="[+as.pagingLink+]">[+as.pagingText+]</a>
    `+]
    [+as.tpl:is=`pagingLinksCurrent`:then=`
      <span class="ajaxSearch_currentPage">[+as.pagingText+]</span>
    `+]
    


    But modx still use the default tpl
    [+as.tpl:is=`paging`:then=`
      <span class="ajaxSearch_paging">
        [+as.pagingText+]
        [+as.pagingLinks+]
      </span>
    `+]
    [+as.tpl:is=`pagingLinks`:then=`
      <a href="[+as.pagingLink+]">[+as.pagingText+]</a>[+as.pagingSeparator+]
    `+]
    [+as.tpl:is=`pagingLinksCurrent`:then=`
      <span class="ajaxSearch_currentPage">[+as.pagingText+]</span>[+as.pagingSeparator+]
    `+]
    


    What am i missing ?

    Thanks for your help (and sorry for my english) smiley

    [ed. note: cloughy last edited this post 7 years, 7 months ago.]
    • Finally I modified the default tpl "\assets\snippets\ajaxSearch\templates\paging0.tpl.html". it works.

      instead If someone know how to use a chunk, i'm interested.

      Thank U.
      • Quote from: cloughy at Aug 26, 2011, 10:51 AM
        Finally I modified the default tpl "\assets\snippets\ajaxSearch\templates\paging0.tpl.html". it works.

        instead If someone know how to use a chunk, i'm interested.

        - It is almost 4 years old, but I guess someone else might still need it. As it is a quite common question:

        =============================
        Type 0 for non-ajax mode only
        Type 1 for non-ajax and ajax mode
        Type 2 for ajax mode (Jquery only)

        &tplPaging0 - Chunk to style the paging links - type 0
        &tplPaging1 - Chunk to style the paging links - type 1
        &tplPaging2 - Chunk to style the paging links - type 2

        http://docs.evolution-cms.com/Extras/Snippets/AjaxSearch
        =============================

        - So it had to be &tplPaging0=`searchPagingTpl`.

        [ MODX Evolution 1.0.15 tested ]. [ed. note: viener last edited this post 3 years, 8 months ago.]