On Friday, January 3, 2014 12:37:35 AM UTC-8, Cooke, Mark wrote: > > Folks, > > I have a plugin which displays rows of results and I was wondering if > there is an easy way to reuse the result pagination code in Trac or if I > have to do it all myself in the plugin code and/or genshi templates? I > would like the paged results to look like the trac standard rather than > spin my own design. > > Note I am still on 0.12.5 pending an "imminent" infrastructure upgrade. > > Many thanks, > > ~ Mark C >
>From what I remember, both TagsPlugin and AccountManager have paginated output. TagsPlugin paginates the output of ListTagged macro (1), and AccountManager paginates the output of the users table on the Admin page. It looks like trac.util.presentation:Paginator is used to do the work (2). Steffen would probably be willing to give you hints if you run into any trouble. (1) Example: http://trac-hacks.org/wiki/0.12 (2) http://trac-hacks.org/browser/tagsplugin/trunk/tractags/macros.py?marks=358,364&rev-13392#L358 -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/groups/opt_out.
