# |
Jul 11th 2018, 09:35 |
joopm |
what is thequickest way to "include" vendor file? |
# |
Jul 11th 2018, 09:35 |
joopm |
hello |
# |
Jul 11th 2018, 09:16 |
Martin` |
ehh parents |
# |
Jul 11th 2018, 09:16 |
Martin` |
I loads more results via pagination via javascript/json I don't want to show the children double :P |
# |
Jul 11th 2018, 09:13 |
lorenzo |
it is not harder because of that |
# |
Jul 11th 2018, 09:13 |
lorenzo |
well, if you are getting 10 results from pagination, then you need to fethc the parent for those 10 results |
# |
Jul 11th 2018, 09:13 |
Martin` |
but I think that is the easiest way to do it, I have an idea how to fix it :P |
# |
Jul 11th 2018, 09:13 |
josbeir |
glad to be of service |
# |
Jul 11th 2018, 09:13 |
prasanna.venkat |
@josbeir great thanks a lot it is working now also i have learned how to create routes |
# |
Jul 11th 2018, 09:12 |
Martin` |
ok I understand, only harder because it is a pagination :P |
# |
Jul 11th 2018, 09:12 |
josbeir |
np |
# |
Jul 11th 2018, 09:11 |
prasanna.venkat |
:+1: thanks |
# |
Jul 11th 2018, 09:11 |
lorenzo |
Martin` collect all children you need with the search, and the fetch again parents for those, I cannot come up right now with a query to collect all parents, so I’ll let you figure that out for yourself |
# |
Jul 11th 2018, 09:11 |
josbeir |
you are mixing caps :P |
# |
Jul 11th 2018, 09:11 |
josbeir |
use specialPage, not specialpage |
# |
Jul 11th 2018, 09:10 |
prasanna.venkat |
$this->Paginator->options(array(‘url’ => [ ‘controller’ => ‘allpages’, ‘specialpage’ => $page_template_name ])); echo $this->element(‘pagination’); |
# |
Jul 11th 2018, 09:10 |
prasanna.venkat |
current route $pages = array(‘scrapbookingpages’, ‘comicpages’, ‘addtoscenepages’, ‘colouringpages’, ‘gamepages’, ‘parentpage’); foreach ($pages as $page) { Router::connect(‘/:specialPage/:action/*’, array(‘controller’ => ‘allpages’), array(‘specialPage’ => $page)); Router::connect(‘/:controller/‘.$page.‘/*’, array(‘controller’ => ‘user_created_pages’, ‘action’ => |
# |
Jul 11th 2018, 09:09 |
josbeir |
show me your route and the paginator options |
# |
Jul 11th 2018, 09:08 |
prasanna.venkat |
@josbeir the url becomes /allpages/index/specialpage:comicpages/page:2 but i need /comicpages/index/page:2 |
# |
Jul 11th 2018, 09:08 |
lorenzo |
Martin` I think you should start simple and use 2 queries |
# |
Jul 11th 2018, 09:07 |
Martin` |
walmart is just an exemple, don't sure if they have different owners per store :P |
# |
Jul 11th 2018, 09:06 |
Martin` |
Owner is optional, because not all walmarts owners have multiple stores :P |
# |
Jul 11th 2018, 09:06 |
Martin` |
it is not a difficult tree, just something like 'Walmart' > 'Owner' > 'Store' |
# |
Jul 11th 2018, 09:06 |
josbeir |
ignore me |
# |
Jul 11th 2018, 09:06 |
josbeir |
i'm just not a fan :) |
# |
Jul 11th 2018, 09:06 |
josbeir |
en rebuilding a tree of very large datasets is not always convenient |
# |
Jul 11th 2018, 09:05 |
josbeir |
but sometimes that is not enough |
# |
Jul 11th 2018, 09:05 |
josbeir |
thats the go to solution yes |
# |
Jul 11th 2018, 09:05 |
Martin` |
then you have to rebuild the full tree? |
# |
Jul 11th 2018, 09:04 |
josbeir |
its just, when trees fail, they fail hard |
# |
Jul 11th 2018, 09:04 |
josbeir |
i always try to avoid trees when i'm developing something |
# |
Jul 11th 2018, 09:04 |
lorenzo |
i think nested set is a good trade off for most web applications |
# |
Jul 11th 2018, 09:03 |
Martin` |
I like the tree's in this usage, I need to make groups where stores are in. as I see now it is up to 2 deep |
# |
Jul 11th 2018, 09:03 |
lorenzo |
yeah, plenty |
# |
Jul 11th 2018, 09:03 |
josbeir |
but that has issues too |
# |
Jul 11th 2018, 09:03 |
josbeir |
theres adjenceny lists... |
# |
Jul 11th 2018, 09:03 |
lorenzo |
josbeir do you know a better representation for trees in sql? I know of one, but not all database support them |
# |
Jul 11th 2018, 09:02 |
Martin` |
lorenzo: Yes al the parents up the root |
# |
Jul 11th 2018, 09:02 |
slackebot4 |
Action: josbeir shouts his humble opinion |
# |
Jul 11th 2018, 09:01 |
josbeir |
nested sets are so pasé |
# |
Jul 11th 2018, 09:01 |
josbeir |
talking about tree's, why is that stuff still in core :) |