Friday, October 2, 2009

Re: How to do ...

Dear Veoempleo,
All you have to do is to define a custom routes in the routes.php file
in the app/config folder
but be aware so that this new custom route dosent overwite any of the
the 7 default routes of the core and the custom routes that are
already in the routes.php file

I recommend you to use this route
Router::connect('/:username',array
('controller'=>'an_existing_users_controller_or_a_new_one','action'=>'the_action_that_displays_what_you_want_to_display'));

so in the 'an_existing_users_controller_or_a_new_one' controller you
define|reuse 'the_action_that_displays_what_you_want_to_display' that
recognize the :username slug as $this->params['username']

On Oct 2, 10:43 pm, Veoempleo <veoemp...@gmail.com> wrote:
> Hi,
>
> I'd like to have a personal link for everyuser, for example:
>
> http://mysite.com/presentation/user_xx
>
> How Could I do that? Do I have to create presentation controller?
>
> params doesn't catch user_xx whitout ":" symbol, how Could I get
> user_xx from controller?
>
> Thank you very much

--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: