<![CDATA[ problem with &tplPaging for ajaxSearch - MODX Community Forums]]> https://forums.modx.com/thread/?thread=48441 <![CDATA[Re: problem with &tplPaging for ajaxSearch]]> https://forums.modx.com/thread/48441/problem-with-tplpaging-for-ajaxsearch#dis-post-527541 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 ].]]>
viener Jun 27, 2015, 11:02 AM https://forums.modx.com/thread/48441/problem-with-tplpaging-for-ajaxsearch#dis-post-527541
<![CDATA[Re: problem with &tplPaging for ajaxSearch]]> https://forums.modx.com/thread/48441/problem-with-tplpaging-for-ajaxsearch#dis-post-391456
instead If someone know how to use a chunk, i'm interested.

Thank U.]]>
cloughy Aug 26, 2011, 05:51 AM https://forums.modx.com/thread/48441/problem-with-tplpaging-for-ajaxsearch#dis-post-391456
<![CDATA[problem with &amp;tplPaging for ajaxSearch]]> https://forums.modx.com/thread/48441/problem-with-tplpaging-for-ajaxsearch#dis-post-279990
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

]]>
cloughy Aug 12, 2011, 09:10 AM https://forums.modx.com/thread/48441/problem-with-tplpaging-for-ajaxsearch#dis-post-279990