The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: "John" <johnsv...@googlemail.com>
Date: Wed, 28 Feb 2007 12:13:58 -0800
Local: Wed 28 Feb 2007 20:13
Subject: Re: Please help me understand URL and Routes in Cake
> So, I'd like to have the following URLs I wanted to do something similar, but rather than using routes I put a > /units - for a view showing a table of multiple units > /units/<unit name> - for a view of the single unit (no, I don't > want to use the action in the URL like /units/view/<unit name>, I'd > like to keep this one as short and simple as possible) condition in the beforeFilter of a controller. The controller is called galleries, I wanted to keep the actions like index, view, detail, etc. So I could have /galleries/view/<gallery id> but also to have /galleries/<region name> Anyway I've got the following in my controller var $regions = array('london', 'south_west', 'north', 'south_east', function beforeFilter() } So if the is a URL like /galleries/london it will route to the the action region() in the controller. It works well, but I was wondering if there are better solutions? You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||