i will try this. it seems like the exact soln. i was looking for. ill
let you know how ti goes! :)

On Aug 20, 3:14 pm, biesbjerg <[EMAIL PROTECTED]> wrote:
> I would do it like this:
>
> Router::connect('/:cat/sells', array('controller' => 'sells', 'action'
> => 'index'), array('cat' => 'wow|uo'));
>
> Now you can access:
> domain.com/wow/sells
> domain.com/uo/sells
>
> in your controller's action you can check $this->params['cat'] which
> will contain either wow or uo.
>
> On 20 Aug., 19:29, rocket <[EMAIL PROTECTED]> wrote:
>
> > Wait sorry. Is generic() some built in feature?
> > I don't quite get it o_O.
>
> > On Aug 19, 4:48 pm, Adrian <[EMAIL PROTECTED]> wrote:
>
> > > I'm doing something similar. If you look towards the bottom of that
> > > link there is a section about prefixes. So your routes look like
>
> > > Router::connect('/wow/:controller/:action');
>
> > > What I'm doing is in the controllers I have an action that takes care
> > > of all the generic logic that can't be accessed by the users:
>
> > > function _sell() {
> > >    //some code here that uses $this->game
>
> > > }
>
> > > Then other publicly accessible functions for each category that set
> > > the category flag and then call the generic function:
>
> > > function wow_sell(){
> > >     $this->game = 'wow';
> > >     $this->_generic();
>
> > > }
>
> > > This way you have all code that is generic the same for each call in
> > > one location and the specific actions just set the proper flag. Hope
> > > this helps.
>
> > > On Aug 19, 4:16 pm, rocket <[EMAIL PROTECTED]> wrote:
>
> > > > i thought i relpied to tis is there a delay? test
>
> > > > On Aug 19, 3:03 pm, teknoid <[EMAIL PROTECTED]> wrote:
>
> > > > > Should be easily handled with 
> > > > > routes...http://book.cakephp.org/view/46/routes-configuration
>
> > > > > There are some good tutorials "out there" as well.
>
> > > > > On Aug 19, 12:28 pm, rocket <[EMAIL PROTECTED]> wrote:
>
> > > > > > hello
> > > > > > i'm building a trading post for my two favorite games, WoW and 
> > > > > > Ultima
> > > > > > Online, but i'm not sure how to handle categories.
>
> > > > > > It will be a common buy/selll/trade pos.
>
> > > > > > Ideally URLs would look like this:
>
> > > > > >www.tradingpost.com/wow/www.tradingpost.com/uo/
>
> > > > > > I know I can create separate folders to do this in the controller, 
> > > > > > wow
> > > > > > and uo respectivley, but then if i do something like this
>
> > > > > >www.tradingpost.com/wow/sellwww.tradingpost.com/uo/sell
>
> > > > > > How do I just share the "sell" controller between them, and rely on
> > > > > > the wow/uo section of the URL to declare the "category ID" for my 
> > > > > > SQL
> > > > > > database?
>
> > > > > > does anyone have any tips? thanks
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to