Re: Nested categories controller and routing

2006-12-27 Thread gremlin
I solved this differently than suggested. This thread has my solution for those interested. http://groups.google.com/group/cake-php/browse_thread/thread/6c7cdd0cc5160a19/ac0466a2764df27f?lnk=gstq=gremlinrnum=2#ac0466a2764df27f --~--~-~--~~~---~--~~ You received

Re: Nested categories controller and routing

2006-11-02 Thread AD7six
Hi Gremlin, I'm surprised this topic is still open. I would suggest: 1) get the passed args. 2) check if the last argument is an integer (if appropriate), if so the last but 1 is the category to search on, else the last argument is the category to search on. 3) for the category unbind all

Re: Nested categories controller and routing

2006-11-01 Thread gremlin
this shouldn't be a problem. you just need to split the args in the categories index () function. You then build you complexity in there, perhaps limiting your depth to 4 /cat/subcat/subsubcat/id The limit is absolutely not an option. I think perhaps a arg count on the parameters could be

Re: Nested categories controller and routing

2006-10-31 Thread Eric C Blount
A really quick search of the group for routing came up with many examples, but all you need to do is put something like the following in your /app/config/routes.php:$Route-connect('/articles/:param1', array('controller' = 'yourController', 'action' = 'yourAction'));

Re: Nested categories controller and routing

2006-10-31 Thread Sonic Baker
On 10/31/06, Eric C Blount [EMAIL PROTECTED] wrote: A really quick search of the group for routing came up with many examples, but all you need to do is put something like the following in your /app/config/routes.php:$Route-connect('/articles/:param1', array('controller' = 'yourController',

Re: Nested categories controller and routing

2006-10-31 Thread Tim
More clearly I can't figure out how I could set a controller to read category information from an url that might have no parameters or 5 or 13 or any other number. The pages controller has these two methods in them: if (!func_num_args()) {

Re: Nested categories controller and routing

2006-10-31 Thread Olivier Percebois-Garve
hi -routes are like Controller/Action/Param/Param -the 'index' is the default action Take your 'Categories' structure and name it articles, so that the route will be domain.ext/ then use the index() method. feed it with you article name's and convert them to id to do your article management.

Re: Nested categories controller and routing

2006-10-31 Thread gremlin
I have thought of all of this before and none of these solutions quite seems to solve my problem. I need to be able to recover the id for the category entry in order to reference various related models to generate the content. The number of parameters in the url needs to be dynamic and must

Nested categories controller and routing

2006-10-30 Thread gremlin
If I create a model with a relationship to itself ie a nested categories model with a belongs to and has many relationship I can easily enough get a set of nested categories data. The problem for me is that if I wish to reference the content related to that category I must either reference it