If you decided to modify helper, you should not copy it to /app/views/
helpers, but create there MyPaginator helper, that extends
PaginatorHelper, where only method numbers() declared. Before class
definition put App::import('Helper', 'Paginator') to load initial
helper, in your app replace user $paginator by $my_paginator, and
declare your new helper instead of core one in $helpers. It's details
of Alaxos proposal.

On Jun 18, 2:32 am, Marius van der Wel <[email protected]>
wrote:
> Thank you both for your comments.
>
> What I've done to achieve this is copy the PaginatorHelper to my App 
> directory where I modified the numbers method. I haven't worked 
> professionally with PHP since the late 90s, so I will definately read up and 
> look into solving it neatly.
>
> For what it's worth, I could probably solve it using just anchor tags, but 
> I'm already using this CSS throughout the site. The sliding doors button 
> technique is a way of generating reusable buttons in CSS, but it relies on an 
> extra span inside the anchor. For an example, Github uses this particular 
> technique in many of their buttons.
>
> Thanks again. Loving Cake so far, even though it's occasionally a bit tough 
> wrapping my head around all the magic. :-)
>
> On 17 Jun 2010, at 19:10, alaxos wrote:
>
>
>
> > Hi,
>
> > I'm not aware of the CSS technique you mention, but if the $option
> > array of the numbers() method can't help you, what I would personally
> > do is creating my own Helper in my app inheriting from the core
> > PaginatorHelper.
>
> > This would allow to override the numbers() method to do what you need,
> > without modifying the core helper. Modifying code under the cake
> > folder is always a bad idea and in your case it can easily be avoid by
> > using inheritance.
>
> > On 17 juin, 00:25, mvanderw <[email protected]> wrote:
> >> Hi all,
>
> >> I'm getting ready to deploy my first full-blown Cake app and am
> >> polishing the last bits and pieces of the front-end. One of the things
> >> I'd like to do is to use the sliding doors CSS technique to create
> >> reusable buttons. For this purpose I'd like to generate spans inside
> >> the anchor tags that the Paginator helper outputs, but it doesn't seem
> >> like the numbers() method accepts any option that lets me do that.
>
> >> Am I overlooking something, or will I have to hack PaginatorHelper to
> >> generate spans inside the anchors?
>
> >> Thanks in advance for any pointers!
>
> >> - Mike
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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