We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5493
    • 6 Posts
    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 12 years, 8 months ago.]
      • 5493
      • 6 Posts
      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.
        • 43810
        • 62 Posts
        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 8 years, 10 months ago.]