Ah, I remember the word for this thing I'm looking for: A Lookup :P

On 9 Okt., 10:23, Andreas Hofmann <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> i discovered the whole Router-class-definition, but I found no method,
> that matches my needs :)
> Is there any way to get the URL of a defined route for an internal
> cake-controller/action-URL.
>
> For example I have this route defined:
>
> Router::connect('/gruppen', array('controller' => 'groups', 'action'
> => 'index'));
>
> Is there now a way to get this defined URL ('/gruppen') by calling a
> function with the params controller/action, like this:
>
> Router::theMagicMethodThatMustExist(
>   array(
>     'controller' => 'groups'
>     'action' => 'index'
>   )
> ); // Should now return '/gruppen'
>
> With this I can undock the URLs from the templates/views! Currently
> I'm doing stuff like this in a view:
>
> $html->link('A Link', '/groups/index');
>
> But this sucks, because when I define a route for '/groups/index', I
> don't want to change the URL in 1000 view-files and replace '/groups/
> index' with '/gruppen' :S Would be nice if there is a method I'm
> looking for, to always get a defined route-URL, if there is one! :)
>
> Is there such a method out there??
>
> Thanks and greetings,
>
> Andreas!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to