Thanks! The "." thing will come in quite handy. However, can I ask for  
you to explain about the logical structure...? In total I have:

/
/schedule/
/events/
/news/
/photos/
/contact/

With each of using a separate route and routing to a different action.

Then I have

/schedule/editrelated/
/events/editrelated/
/news/editrelated/

For users (with the correct permissions) to edit the related links  
that appear. This seems quite logical to me... is it not? One thing is  
that the 'editrelated' routes are repeated for the schedule/events/ 
news: almost just copied/pasted between them. I this what you you  
mean? How can this be avoided?

Michal.



On 7 Mar 2009, at 23:16, David Zülke wrote:

> You really should create a logical structure for your URLs. They're  
> way easier to maintain and implement this way. Look at the sample  
> app (or at the example "agavi project" creates for you). Also mind  
> the ability to concatenate nested route names by starting the name  
> with ".", and nesting Actions (also with ".", and also demo-ed in  
> the Sample App).
>
>
>
> On 07.03.2009, at 20:58, Michal Charemza wrote:
>
>> Thanks, that worked a treat!
>>
>> On 7 Mar 2009, at 19:50, Veikko Mäkinen wrote:
>>
>>> Michal Charemza wrote:
>>>
>>>>
>>>> <route pattern="^/schedule/" module="Schedule"  
>>>> action="ShowSchedule"
>>>> name="Schedule">
>>>>    <route pattern="^editlinks/$" module="Related"  
>>>> action="EditRelated"
>>>> name="EditRelatedSchedule" />
>>>> </route>
>>>>
>>>> I've tried various combination of "^" and "$" in the patterns but
>>>> I've
>>>> not managed to force paths like:
>>>>
>>>> /schedule/gibberish
>>>>
>>>> to result in a 404 error. How can I force a 404 error in these  
>>>> sorts
>>>> of cases?
>>>>
>>>
>>> The problem here is the parent route matches /schedule/anything_here
>>> AND
>>> selects an action. Move the action to a child route and you should
>>> be fine.
>>>
>>> <route pattern="^/schedule" module="Schedule" name="Schedule">
>>> <route pattern="^$" action="ShowSchedule" />
>>> <route pattern="^editlinks/$" ... />
>>> </route>
>>>
>>>
>>> -- 
>>> Veikko Mäkinen
>>> [email protected]
>>> 044 5910 413
>>> http://blog.veikko.fi
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> http://lists.agavi.org/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.agavi.org/mailman/listinfo/users
>>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to