one more question:) is it possible to route subdomains as well such easy way? :)
let say that we rout ... subdomain.example.com.... to index of a specific controller... OR this is done in httpd.ini ?? Thanks Tomas On Jun 23, 2:26 pm, "toka...@gmail.com" <toka...@gmail.com> wrote: > Hi Adam, > thanks a lot, I did not realize that it is so easy... I have already > try it and it is working. :) > anyway good point with the whole path... > > Tomas > > On Jun 23, 12:45 pm, "Adam Royle" <a...@sleekgeek.com.au> wrote: > > > Setup a route like this: > > > Router::connect('/categories/*', array('controller' => 'categories', > > 'action' => 'index')); > > > Then in your index() method of CategoriesController you can then check for > > the additional params in $this->params... > > > This is not so dissimilar how Cake's PagesController works. > > > I do something like this, however I store the entire path (eg "slug1/slug2") > > in the database, since you might have duplicate identifiers like so: > > > /categories/sony/video-cameras/ > > /categories/philips/video-cameras/ > > > Cheers, > > Adam > > > ----- Original Message ----- > > From: <toka...@gmail.com> > > To: "CakePHP" <cake-php@googlegroups.com> > > Sent: Tuesday, June 23, 2009 8:20 PM > > Subject: n-categories URL routing > > > > Hi, > > > I it possible to make such a URL routing in cake? > > > > subdomain.example.com/categories/category1/category2/category-n > > > > I am wondering whether is possible to specify an URL relatively for N- > > > levels of nested sub-categories... > > > > imagine you have e.g. eshop with following structure: > > > > *Electronics > > > *****Computers > > > ********Accesories > > > > So the following url would look like > > > - Electronics/Computers/Accesories > > > > for accessing accesories I need only accesories slug or ID - and it > > > already knows its parents in the tree representation. How can I > > > relatively specify in router that everything in-between categories and > > > category-n (******) > > > is ignored?? or in other words, how to extract only the last items > > > which is the identifier?? > > > > myshop.example.com/categories/******/******/******/******/identifier- > > > slug > > > > I have found very nice real example: > > >http://www.mujmultimarket.cz/kategorie/elektronika/audio-video/audios... > > > > Thanks!! Tomas --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---