Say I have a template at http://somehost/some/path?a=1&b=2 and in that
template I want to link to the same page but with modified and/or
augmented query parameters, e.g. http://somehost/some/path?a=2&b=2&c=2.
Initially I was using tg.url('.', tg.request.params, a=2, c=2), until
one template where tg.request.params was a nested dict, e.g. {'a':2,
'b':[1,2]}. So currently I use the following abomination but I hope
there is a better way:
<a py:with="variable_encode = __import__('formencode.variabledecode',
fromlist=1).variable_encode">
href="${tg.url('.', variable_encode(tg.request.params,
add_repetitions=False),
a=2,c=2)}">
Some anchor text
</a>
George
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---