source: spip-zone/_plugins_/pagination/modeles/pagination.html @ 43228

Last change on this file since 43228 was 43228, checked in by cedric@…, 9 years ago

Un modele complet de pagination, et plein de variantes de style
adaptees de http://mis-algoritmos.com/2007/03/16/some-styles-for-your-pagination/

File size: 2.0 KB
Line 
1#ENV*{bloc_ancre}
2#SET{bornes,#ENV{page_courante}|bornes_pagination{#ENV{nombre_pages},10}}
3#SET{premiere, #GET{bornes}|reset}
4#SET{derniere, #GET{bornes}|end}
5#SET{pages,#GET{premiere}|range{#GET{derniere}}}
6#SET{sep,#ENV{separateur,'-'}}
7<B_pages>
8<span class='label'><:pagination:pages:></span>[
9(#SET{item, #ENV{page_courante}|moins{2}|mult{#ENV{pas}} })
10][<span
11        class="prev[(#ENV{page_courante}|<={1}|oui)disabled]">(#ENV{url}
12|parametre_url{#ENV{debut},#GET{item}}
13|ancre_url{#ENV{ancre}}
14|lien_ou_expose{<:pagination:prev:>,#ENV{page_courante}|<={1},'lien_pagination','',nofollow}
15|inserer_attribut{rel,prev}
16)[<span class='sep'>(#GET*{sep})</span>]</span>]<span class="pages">[<a
17        href='[(#ENV{url}|parametre_url{#ENV{debut},''})]##ENV{ancre}'
18        class='lien_pagination'
19        rel='nofollow'>(#GET{premiere}|>{1}|?{1})</a><span
20        class="tbc">[<span
21        class='sep'>(#GET*{sep})</span>]...[<span
22        class='sep'>(#GET*{sep})</span>]</span>]<BOUCLE_pages(POUR){tableau #GET{pages}}>[
23        (#SET{item, #VALEUR|moins{1}|mult{#ENV{pas}} })
24        ][(#ENV{url}
25        |parametre_url{#ENV{debut},#GET{item}}
26        |ancre_url{#ENV{ancre}}
27        |lien_ou_expose{#VALEUR,#VALEUR|=={#ENV{page_courante}},lien_pagination,'',nofollow})][<span
28        class='sep'>(#VALEUR|<{#GET{derniere}}|?{#GET{sep}})</span>]</BOUCLE_pages>[<span
29        class="tbc">[<span
30        class='sep'>(#GET*{sep})</span>]...[<span
31        class='sep'>(#GET*{sep})</span>]</span><a
32        href='[(#ENV{url}|parametre_url{#ENV{debut},#ENV{nombre_pages}|moins{1}|mult{#ENV{pas}}})]##ENV{ancre}' class='lien_pagination' rel='nofollow'>(#GET{derniere}|<{#ENV{nombre_pages}}|?{#ENV{nombre_pages}})</a>]</span>[
33        (#SET{item, #ENV{page_courante}|mult{#ENV{pas}} })
34        ][<span
35        class="next[(#ENV{page_courante}|>={#ENV{nombre_pages}}|oui)disabled]">[<span class='sep'>(#GET*{sep})</span>](#ENV{url}
36|parametre_url{#ENV{debut},#GET{item}}
37|ancre_url{#ENV{ancre}}
38|lien_ou_expose{<:pagination:next:>,#ENV{page_courante}|>={#ENV{nombre_pages}},'lien_pagination','',nofollow}
39|inserer_attribut{rel,next}
40)</span>]
41</B_pages>
Note: See TracBrowser for help on using the repository browser.