Hi there, I have a route that looks like this:
map.connect('/wiki/*slug',
controller="wiki",
action="view")
Later on I try to expand my wiki links with
url = h.url_for(controller="/wiki",
action="view",
slug=normalize_page(page))
return '<a href="%s">%s</a>' % (url, label or page)
What I get is something like:
<a href="/wiki/">foo</a>
The problem here is that the slug is not expanded in the generated
URL; I'd like something like
<a href="/wiki/Foo">foo</a>
I didn't find a mention in a Routes manual that wild url parts
could not be expanded by url_for() but it could be an undocumented
feature. Should I be able to expand the URLs the way I do?
Before you point out that I don't need a wild URL part, I'd like to
mention that I want various levels of namespaces and clean action
URLs:
/wiki/Cars/Sport/Mustang/edit
/wiki/Tomato
/wiki/Tomato/recent_changes
/wiki/Programming/Languages/Functional/Standardized/Common%20Lisp
and so on. It seems to me that wild URL part is the way to go but I'm
open to other suggestions.
Best regards,
--
Yannick Gingras
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---