Pylons paginator question

Posted by Timmy on Stack Overflow See other posts from Stack Overflow or by Timmy
Published on 2010-04-07T17:38:24Z Indexed on 2010/04/08 3:53 UTC
Read the original article Hit count: 455

Filed under:
|

Only comments associated with the current page should be listed, so once again the query is modified to include the page ID. In this case, though, we also have to pass the pageid argument, which will in turn get passed to any h.url_for() calls in the paginator.

from http://pylonsbook.com/en/1.1/simplesite-tutorial-part-2.html

i cannot get this to work, the paginator does not pass things to the h.url_for, i followed the tutorial. i had to add pageid to the h.url_for in list.html. how do i solve?

part of the code:

        ${h.link_to(
            comment.id,
            h.url_for(
                controller=u'comment',
                action='view',
                id=unicode(comment.id)
            )
        )}

but it does not work properly until i put in

        ${h.link_to(
            comment.id,
            h.url_for(
                controller=u'comment',
                action='view',
                id=unicode(comment.id),
                pageid = c.page.id
            )
        )}

© Stack Overflow or respective owner

Related posts about pylons

Related posts about python