Re: How to pass an URL to PaginatorHelper::numbers()?

2007-05-08 Thread AD7six



On May 8, 9:04 pm, "Marcus T. Jaschen" <[EMAIL PROTECTED]> wrote:
> Marcus T. Jaschen wrote:
> > Works like a charm!
>
> > But if I want to generate numbered links with the numbers() method of
> > the paginator helper the passed URL is not recognized. The generated
> > URLs in the number links look like this:
>
> > foobar.com/photosets/view/url:array/page:2
>
> > In cake/libs/view/helpers/paginator.php line 253 the $url variable gets
> > changed in a way I cannot understand fully.
>
> > Maybe someone can help me with this issue.
>
> Ok, I try to help myself:
>
> Calling the numbers() method in the following way works as I want it:
>
> $paginator->numbers($photoset_id);
>
> But I think this behaviour is not intended because it conflicts with the
> well known way to pass URLs.
>
> M.

Hi M.

If you put the following call before using the helper:
$paginator->options(array('url' => isset($this->params['pass'])?$this-
>params['pass']:array()));

The links for the paginator helper will include whatever other
parameters (but not get params) are currently in the url.

hth,

AD


--~--~-~--~~~---~--~~
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: How to pass an URL to PaginatorHelper::numbers()?

2007-05-08 Thread Marcus T. Jaschen

Marcus T. Jaschen wrote:
> Works like a charm!
> 
> But if I want to generate numbered links with the numbers() method of 
> the paginator helper the passed URL is not recognized. The generated 
> URLs in the number links look like this:
> 
> foobar.com/photosets/view/url:array/page:2
> 
> In cake/libs/view/helpers/paginator.php line 253 the $url variable gets 
> changed in a way I cannot understand fully.
> 
> Maybe someone can help me with this issue.

Ok, I try to help myself:

Calling the numbers() method in the following way works as I want it:

$paginator->numbers($photoset_id);

But I think this behaviour is not intended because it conflicts with the 
well known way to pass URLs.

M.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to pass an URL to PaginatorHelper::numbers()?

2007-05-08 Thread Marcus T. Jaschen

Hi there,

when generating paging links with PaginatorHelper's prev() and next() 
functions I can pass an URL in this form (2nd argument, $options):

$paginator->prev('Back', array('url' => array('controller' => 
'photosets', 'action' => 'view', $photoset_id)));

The generated URLs of the pagination links look like this:

foobar.com/photosets/view/344/page:2

Works like a charm!

But if I want to generate numbered links with the numbers() method of 
the paginator helper the passed URL is not recognized. The generated 
URLs in the number links look like this:

foobar.com/photosets/view/url:array/page:2

In cake/libs/view/helpers/paginator.php line 253 the $url variable gets 
changed in a way I cannot understand fully.

Maybe someone can help me with this issue.

Marcus


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---