%def name="navlinks(view, curr, last, **kwargs)"> <% kwargs['_query'] = {'page': None} if 'search_query' in kwargs.keys(): kwargs['_query'] = dict(kwargs['_query'].items() + kwargs['search_query'].items()) %> % if not last: <% last = 1 %> % endif % if not (curr == last and curr == 1):