# |
Jul 11th 2018, 08:52 |
lorenzo |
Martin` you need to add more context yo your question, it is not clear what you want to do |
# |
Jul 11th 2018, 08:52 |
josbeir |
will cause issues tho |
# |
Jul 11th 2018, 08:51 |
josbeir |
i forgot if its in request or not |
# |
Jul 11th 2018, 08:51 |
josbeir |
$this->Paginator->pagination(array(‘ul’ => $this->here)); or $this->Paginator->pagination(array(‘ul’ => $this->request->here)); |
# |
Jul 11th 2018, 08:51 |
josbeir |
you could try this but i forgot it it would work in cake 2 |
# |
Jul 11th 2018, 08:51 |
josbeir |
there is no way to match the uniqueness of your current route |
# |
Jul 11th 2018, 08:50 |
josbeir |
it should but the issue also lies with your routes |
# |
Jul 11th 2018, 08:50 |
prasanna.venkat |
is this explained in documentation |
# |
Jul 11th 2018, 08:49 |
josbeir |
you must generate an url array that matches the route you want |
# |
Jul 11th 2018, 08:49 |
josbeir |
$this->Paginator->pagination(array(‘url' => ... |
# |
Jul 11th 2018, 08:47 |
prasanna.venkat |
@josbeir how to add url in paginator |
# |
Jul 11th 2018, 08:46 |
Martin` |
:P |
# |
Jul 11th 2018, 08:46 |
Martin` |
I've ask this question already yesterday, but I did not solved my problem yet. I'm using crud plugin with the search plugin. Now I want to search, but I always want the groups of the items what i'm searching. how can I add something to query that I always find the groups? I already tried in beforePaginate to add ->orWhere(['folder' => 1]); to query, but that does not work, I only found the groups/folders |
# |
Jul 11th 2018, 08:37 |
josbeir |
so you need to pass your context somewhere so the url's that are built in your view are aware of the current name |
# |
Jul 11th 2018, 08:37 |
josbeir |
the issue is also, you are creating multiple routes that all point to the same action, paginator wants to build a url based on current controller/action, it will check the routes you defined and return the first match |
# |
Jul 11th 2018, 08:36 |
prasanna.venkat |
$this->Paginator->pagination(array(‘ul’ => ‘pagination’)); in view how to add options to this |
# |
Jul 11th 2018, 08:34 |
josbeir |
$this->Paginator->options(array('url' => ... )) |
# |
Jul 11th 2018, 08:34 |
josbeir |
in the view you are using pagination make sure to set the correct url |
# |
Jul 11th 2018, 08:33 |
josbeir |
are you passing the correct url to the pagination helper? |
# |
Jul 11th 2018, 08:32 |
prasanna.venkat |
yes, |
# |
Jul 11th 2018, 08:32 |
josbeir |
but pagination is not ? |
# |
Jul 11th 2018, 08:32 |
josbeir |
so the routes are working ? |
# |
Jul 11th 2018, 08:32 |
prasanna.venkat |
pagination links for all this are become first element of $pages array |
# |
Jul 11th 2018, 08:30 |
josbeir |
what issue do you have? |
# |
Jul 11th 2018, 08:30 |
prasanna.venkat |
cake 2 |
# |
Jul 11th 2018, 08:30 |
josbeir |
also, 'defaultRoute' is not needed. |
# |
Jul 11th 2018, 08:30 |
josbeir |
cakephp 2 or 3? |
# |
Jul 11th 2018, 08:29 |
josbeir |
i saw |
# |
Jul 11th 2018, 08:29 |
slackebot4 |
Router::connect(‘/:controller/‘.$page.‘/*’, array(‘controller’ => ‘user_created_pages’, ‘action’ => ‘allpages’), array(‘defaultRoute’ => true)); } |
# |
Jul 11th 2018, 08:29 |
prasanna.venkat |
Prasanna [12:39 PM] $pages = array(‘scrapbookingpages’, ‘comicpages’, ‘addtoscenepages’, ‘colouringpages’, ‘gamepages’, ‘parentpage’); foreach ($pages as $page) { Router::connect(‘/’.$page, array(‘controller’ => ‘allpages’, ‘action’ => ‘index’), array(‘defaultRoute’ => true)); Router::connect(‘/’.$page.‘/:action/*’, array(‘controller’ => ‘allpages’), array(‘d |
# |
Jul 11th 2018, 08:29 |
prasanna.venkat |
@josbeir i have added routing as |
# |
Jul 11th 2018, 08:29 |
tim |
Well, yesterday happened. |
# |
Jul 11th 2018, 08:27 |
neon1024 |
Thanks @josbeir I will take a look at that after I’ve finished writing a unit test for `findCompany()` and pair programming with my colleague. |
# |
Jul 11th 2018, 08:27 |
josbeir |
websites.{*}.id ? |
# |
Jul 11th 2018, 08:27 |
josbeir |
https://github.com/cakephp/cakephp/blob/master/src/Collection/ExtractTrait.php#L43 |
# |
Jul 11th 2018, 08:26 |
josbeir |
maybe that works? |
# |
Jul 11th 2018, 08:26 |
josbeir |
@neon1024 i'm finding references that you can use {*} in the path |
# |
Jul 11th 2018, 08:24 |
josbeir |
what happened ? :,) |
# |
Jul 11th 2018, 08:24 |
tim |
@josbeir Hi :( |
# |
Jul 11th 2018, 08:21 |
josbeir |
cake 2, cake 3? |
# |
Jul 11th 2018, 08:21 |
josbeir |
what is your issue |