• problem with &tplPaging for ajaxSearch#

  • cloughy Reply #1, 9 months, 1 week ago

    Reply
    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)


  • cloughy Reply #2, 8 months, 4 weeks ago

    Reply
    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.