Re: Default Pagination options

2007-06-11 Thread rtconner

For future people with this problem...
Well I found something that finally worked the way I want it. I'm not
sure if this is the proper way to order pagination, but its the only
one which works properly.

var $paginate => array('order'=>array('account_number' => 'desc'));

gwoo said on IRC that array('order' => 'account_number ASC') should
work, but paginator does not properly recognize it. I'll file a bug on
that.


On Jun 6, 12:15 pm, rtconner <[EMAIL PROTECTED]> wrote:
> Ok, right now I'm leaning towards "I've found a bug". But we'll see
> how this pans out.  Lets start here.. a simple quesiton... If this
> gets anwered, maybe there are no problems.
>
> What is the correct way to set the default pagination direction and
> column using the pagination in Cake 1.2?
>
> (FYI, a direction or sort column in the $paginatevariable in the
> controller seems to not let that value ever change using the data from
> the url)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Default Pagination options

2007-06-06 Thread rtconner

AD7Six's Pagination helper for 1.1 looks great. But I'm trying to use
the paginatior which comes embedded in 1.2.
No articles in the bakery foir 1.2. Maybe I'll have to write an intro
to pagination for the bakery or something.

On Jun 6, 1:36 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 6/6/07, rtconner <[EMAIL PROTECTED]> wrote:
>
>
>
> > Well, we're half way there. It kind of worked, technically the select
> > worked and selected the data in the correct order.
>
> > But the problem is this: The $paginator helper does not recognize the
> > $order var. So when I call $paginator->sort(), it sorts by its own set
> > of default criteria. This criteria I cannot figure out how to set just
> > yet. Do you know how to control the PaginatorHelpers default order?
>
> Check out this article at the bakery.  It might help.
>
> http://bakery.cakephp.org/tags/view/pagination
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Default Pagination options

2007-06-06 Thread Chris Hartjes

On 6/6/07, rtconner <[EMAIL PROTECTED]> wrote:
>
> Well, we're half way there. It kind of worked, technically the select
> worked and selected the data in the correct order.
>
> But the problem is this: The $paginator helper does not recognize the
> $order var. So when I call $paginator->sort(), it sorts by its own set
> of default criteria. This criteria I cannot figure out how to set just
> yet. Do you know how to control the PaginatorHelpers default order?

Check out this article at the bakery.  It might help.

http://bakery.cakephp.org/tags/view/pagination

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Default Pagination options

2007-06-06 Thread rtconner

Well, we're half way there. It kind of worked, technically the select
worked and selected the data in the correct order.

But the problem is this: The $paginator helper does not recognize the
$order var. So when I call $paginator->sort(), it sorts by its own set
of default criteria. This criteria I cannot figure out how to set just
yet. Do you know how to control the PaginatorHelpers default order?


On Jun 6, 12:46 pm, Falagar <[EMAIL PROTECTED]> wrote:
> Just set var $order in the appropriate model and that naturally will
> be the default order and direction for pagination as well.
>
> On Jun 6, 11:15 am, rtconner <[EMAIL PROTECTED]> wrote:
>
> > Ok, right now I'm leaning towards "I've found a bug". But we'll see
> > how this pans out.  Lets start here.. a simple quesiton... If this
> > gets anwered, maybe there are no problems.
>
> > What is the correct way to set the default pagination direction and
> > column using the pagination in Cake 1.2?
>
> > (FYI, a direction or sort column in the $paginate variable in the
> > controller seems to not let that value ever change using the data from
> > the url)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Default Pagination options

2007-06-06 Thread Falagar

Just set var $order in the appropriate model and that naturally will
be the default order and direction for pagination as well.

On Jun 6, 11:15 am, rtconner <[EMAIL PROTECTED]> wrote:
> Ok, right now I'm leaning towards "I've found a bug". But we'll see
> how this pans out.  Lets start here.. a simple quesiton... If this
> gets anwered, maybe there are no problems.
>
> What is the correct way to set the default pagination direction and
> column using the pagination in Cake 1.2?
>
> (FYI, a direction or sort column in the $paginate variable in the
> controller seems to not let that value ever change using the data from
> the url)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Default Pagination options

2007-06-06 Thread rtconner

Ok, right now I'm leaning towards "I've found a bug". But we'll see
how this pans out.  Lets start here.. a simple quesiton... If this
gets anwered, maybe there are no problems.

What is the correct way to set the default pagination direction and
column using the pagination in Cake 1.2?

(FYI, a direction or sort column in the $paginate variable in the
controller seems to not let that value ever change using the data from
the url)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---