try var $paginate = array( 'url' => array('controller' => 'members', 'action' => 'index'),
On Fri, May 16, 2008 at 12:42 AM, b logica <[EMAIL PROTECTED]> wrote: > > There's not much to show. All I want to do is prepend '/membership/' > to all members routes. > > This works fine: > Router::connect('/membership/members', array('controller' => > 'members', 'action' => 'index')); > > MembersController: > > var $paginate = array( > 'url' => array('/membership/members'), > 'limit' => 20, > 'page' => 1, > 'order' => array('Member.last_name' => 'ASC'), > 'fields' => array( > 'Member.id', > 'Member.first_name', > 'Member.last_name', > 'Member.slug' > ) > ); > > function index() > { > $this->Member->recursive = 0; > $this->set('members', $this->paginate()); > } > > view: > > <?= $paginator->prev() . ' ' . $paginator->numbers() . ' ' . > $paginator->next(); ?> > > The "next" link is created as /members/index/page:2 > > I've tried adding the URL to these methods in several ways, debugging > in Paginator, but nothing's worked. I don't kow if this is a > shortcoming of either Paginator or Route, or if I just haven't > uncovered the magic formula to pass. > > On Thu, May 15, 2008 at 6:11 PM, Nicolás Andrade > <[EMAIL PROTECTED]> wrote: >> I would like to see each php code and the resulting HTML link, if possible. >> >> It might help us to help you. >> >> >> >> >> >> On Thu, May 15, 2008 at 6:36 PM, b logica <[EMAIL PROTECTED]> wrote: >>> >>> Speaking of generic, I'm wondering if Nicolás' bug is more of an admin >>> routing one or something specific to pagination/routing. IOW, I still >>> don't know if what I want to do has an existing solution or I need to >>> hack Router as well. For the moment, I'm rolling my own pagination but >>> I'd really prefer to use something built-in. >>> >>> On Thu, May 15, 2008 at 4:46 PM, Chris Hartjes <[EMAIL PROTECTED]> wrote: >>> > On Thu, May 15, 2008 at 4:32 PM, Nicolás Andrade >>> > <[EMAIL PROTECTED]> wrote: >>> >> >>> >> >>> >> To solve my issue, I've added the following lines: >>> >> >>> >> if(strpos($url['action'], >>> >> Configure::read('Routing.admin') . >>> >> '_') !== false){ >>> >> $url['action'] = >>> >> str_replace(Configure::read('Routing.admin') . '_' , '', >>> >> $url['action']); >>> >> } >>> >> >>> >> in /cake/libs/router.php, line 749 aprox. >>> > >>> > Please file a ticket over at trac.cakephp.org about this, as it might >>> > be something that can be fixed in a more generic way. >>> > >>> > -- >>> > Chris Hartjes >>> > Internet Loudmouth >>> > Motto for 2008: "Moving from herding elephants to handling snakes..." >>> > @TheKeyBoard: http://www.littlehart.net/atthekeyboard >>> > >>> > > >>> > >>> >>> >> >> >> >> -- >> Nicolás Andrade >> www.nicoandra.com.ar >> www.treintaguita.com.ar >> > >> > > > > -- Marcin Domanski http://kabturek.info --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---