Im not sure about the link names at the moment. I have to discuss
things with the client, I just wanted to makes sure that the code
worked as I expected beforehand. I expect the links to be case
sensitive, what I posted is definitely a typo. Just being curious, How
does one create case insensitive links?
Thanks Ben
On May 18, 5:27 pm, Ben Bangert <[EMAIL PROTECTED]> wrote:
> voltron wrote:
> > Given these main site links:
> > ["home", "Link1", "Link2"]
>
> > Each of these main links have sub links for example:
> > home/sublink1
> > home/sublink2
> > Link1/sublink1
> > Link2/sublink3
>
> > the routing could be as follows
>
> > map.connect('Home', '', controller='home', action='index' )
> > map.connect('Home', '/Home', controller='home', action='index' )
> > map.connect('Home', '/Home/sublink1', controller='home',
> > action='sublink1' )
> > map.connect('Home', '/Home/sublink2', controller='home',
> > action='sublink2' )
>
> If you provide a string name in front of the path to be used, that's
> considered a named route. Named route's should have *unique* names, in
> your case you named all your routes 'Home', which isn't right.
>
> You said the routing 'could be', is that the actual routing you're using
> or not?
>
> If you have multiple actions you wish to have under /Home, then you
> could replace the last 3 routes shown with:
>
> map.connect('Home/:action', controller='home', action='index')
>
> Which will have /Home work as you want, with /Home/sublink2 going to
> sublink2, etc.
>
> > and so on
>
> > I have problems with the main page, this route:
> > map.connect('Home', '/Home', controller='home', action='index' )
>
> > calls this url "/home/home" and does not go back to the index as
> > expected(404). What would be the right way to route this?
>
> How are you generating the URL? Also, are you expecting the routes to
> not be case sensitive (your example uses Home, not home as your URL
> being called shows)?
>
> Cheers,
> Ben
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---