On Thursday 30 July 2009 16:11:40 adam wrote:
> how do you mean. I have tried searcging the turbogears site for
> additional path-elements and getting nothing
Less searching, more experimenting: if you create an controller action like
this:
@expose(...)
def homepage(self, pagename):
...
you can call it with either
http://myhost/homepage?pagename=foobar
or with
http://myhost/homepage/foobar
Which is what you wanted, isn't it?
Additionally, you can (and should) use the "url_for"-function to create url,
and this will also convert passed positional arguments to paths, like this:
url_for("/homepage", "foobar")
Diez
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---