I hope my user use the link http://www.mysite.com/username
goto his Top page.

so the username is the param of  toppage

but it has the ability that  same with controller's name.





2009/1/7 Marcelius <[email protected]>

>
> It's always "myurl.com/controller/action/params"
>
> So myurl.com/texts matches controller texts by default.
>
> With routes you can however:
> Router::connect('/texts', array('controller' => 'books', 'action' =>
> 'show', 'home'));
>
> So myurl.com/texts matches controller books and action show, with
> param 'home'
>
> If you want to add a param to your index action, you could go to
> myurl.com/books/index/texts
>
> On 7 jan, 08:53, Rimoe <[email protected]> wrote:
> > hi,
> > everyone.
> >
> > how to distinguish param and action in cakephp's URL
> >
> > for example
> > I have write
> >    [Router::connect('/', array('controller' => 'books', 'action' =>
> 'show',
> > 'home'));]
> > in my file of routes.php
> >
> > I can use the link[http://www.mysite.com/] to visit the action
> >
> > but if I plus a param 'texts'
> > I think the URL is[http://www.mysite.com/texts],
> >
> > but I have a controller, it's name is texts too,
> > it's URL is [http://www.mysite.com/texts]
> >
> > cakephp how to know the 'texts' is a controller or a param?
> >
> > Thanks.
> >
> > Rimoe
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to