[nycphp-talk] cake url question
Baer, Jon
jbaer at VillageVoice.com
Wed Nov 1 11:54:49 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nate -
Is there an updated timeframe to when v1.2 will launch?
- - Jon
- -----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Nate Abele
Sent: Wednesday, November 01, 2006 11:21 AM
To: talk at lists.nyphp.org
Subject: Re: [nycphp-talk] cake url question
Hi Marcin,
Cake 1.2 adds support for this. In app/config/routes.php, you can add a
route like the following:
Router::connect('/:car_brand', array('controller' => 'cars', 'action'
=> 'view'), array('car_brand' => 'bmw|toyota|nissan'));
The only issue is that all the possible values of car_brand must be
hard-coded into the route.
- -Nate
> Date: Wed, 1 Nov 2006 11:27:21 +0000
> From: "Marcin Szkudlarek" <marcin.szkudlarek at gmail.com>
> Subject: [nycphp-talk] cake url question
> To: talk at lists.nyphp.org
> Message-ID:
> <d2969d250611010327g34a88fe8n9112054120e45a5d at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I would like to map multiple url to one controller method like this:
>
> example.com/bmw
> example.com/toyota
> example.com/nissan
> ..
> should invoke method (for example "view") in my controller with
> parameter "bmw", "toyota" etc.
> Probably I should configure it in routes.php but I don't have idea
> how.
>
> Regards,
>
> Marcin
> -------------- next part --------------
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFFSNFZ99e5DI8C/rsRAoGOAJ4t9EBN00yPEEt8pk1xq6X5I6FqgwCcDNqy
apSZOvOgdirRNbNUU+/jLdY=
=Nwok
-----END PGP SIGNATURE-----
More information about the talk
mailing list