templates/inc_paginate.tmpl
changeset 107 67f48e288102
parent 79 43ac75054d5c
--- a/templates/inc_paginate.tmpl	Wed Feb 11 04:57:55 2009 +0200
+++ b/templates/inc_paginate.tmpl	Wed Feb 11 21:49:35 2009 +0200
@@ -1,11 +1,29 @@
+## special overrides...
+<%def name="paginate_left()">
+
+</%def>
+
 <%def name="paginate(url, count, page_cur, page_max, _more=None, _last=False, **args)">
     <%doc>
         Pagination works using page numbers, with a specific number of maximum pages displayed. If _more is True,
         then instead of a "Next" button, we have a "More" button, which goes to the max+1'th page, unless _last is
-        True, whereupon it's not displayed
+        True, whereupon it's not displayed.
+
+        Can be called using <%call>, whereupon caller.left/caller.right can define additional data to display at the
+        left/right of the pagination ul.
     </%doc>
     <div class="paginate">
         <ul>
+        % if caller and caller.right :
+            <li class="paginate-right">
+                ${caller.right()}
+            </li>
+        % endif
+        % if caller and caller.left :
+            <li class="paginate-left">
+                ${caller.left()}
+            </li>
+        % endif
             <li>
             % if page_cur > 1 :
                 <a href="${h.build_url(url, count=count, page=page_cur-1, max=max, **args)}">&laquo; Prev</a>