What does your routes.py file look like now?

On Monday, September 2, 2013 2:22:38 AM UTC-7, xelomac wrote:
>
> Hi everybody,
>
> after playing around with routes.py for a while I wonder if what I want to 
> do is possible at all. I want to rewrite the URLs shown to the visitor 
> after clicking a menu link in the following way:
>
> Lets say I built a site that deals with colors. My menu shows base color 
> links like red, green, blue on the top level and variations of the the base 
> colors on the next menu level. My app would be named "color_book" my 
> controller "colors" and the the function showing the pages 
> "show_color_page".
>
> After clicking the submenu item "light-blue" under the parent menu-item 
> "blue" I would normally see an URL in the browser like:
> http://my.domain.com/color_book/colors/show_color_page/light-blue
>
> But I want to rewrite the URL to: http://my.domain.com/blue/light-blue
>
> Accordingly a page with the menu location "red > dark-red" should be 
> presented with: http://my.domain.com/red/light-red
>
> I thought that a pattern-based routes.py could be configured to do things 
> like that. But I've only had success with rewriting URLs manually entered 
> in the browser's address field so far- but not with internal links.
>
> Is there an example for my use case somewhere?
>
> Thanks for any help!
>  
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to