Page_List pagination won't work.
Permalink 1 user found helpful
Hi all,
I've been manually using page_list with the code below in my template but I can't seem to make pagination work. I've added a block the visual way in the FRONT-END just to check if I missed something but it work that way. Can anyone tell me if they have that simular problem? Is it a bug?
I don't understand, I added all controllers and there proper values and pagination dont appear when manually inserting the code.
Thank you
I've been manually using page_list with the code below in my template but I can't seem to make pagination work. I've added a block the visual way in the FRONT-END just to check if I missed something but it work that way. Can anyone tell me if they have that simular problem? Is it a bug?
<?php $bt = BlockType::getByHandle('page_list'); $bt->controller->num = 5; // pages to display $bt->controller->orderBy = 'display_asc'; //display_asc, display_desc, chrono_asc, alpha_asc, alpha_desc $bt->controller->cParentID = $c->getCollectionID(); // cID of the page that's above the pages you'd like to list $bt->controller->cThis = 1; $bt->controller->paginate = 1; // 0:false / 1:True ( add pagination if more then NUM value ) $bt->controller->displayAliases = 1; // 0:false / 1:True // $bt->controller->ctID = 14; // display only from this page_type ID $bt->controller->rss = 0; $bt->controller->truncateSummaries = 0; // 0:false / 1:True $bt->controller->truncateChars = 0; $bt->controller->displayFeaturedOnly = 0; // 0:false / 1:True = Display is_featured only $bt->render('view'); ?>
I don't understand, I added all controllers and there proper values and pagination dont appear when manually inserting the code.
Thank you
Nevermind this comment!
This is just what I needed! Thanks!
This was very helpful, but I'm a little stumped trying to change the view of the pagination? What's the best approach?
I posted to this thread already on the topic:http://www.concrete5.org/community/forums/customizing_c5/page_list_...
Sorry to post twice, but there's a relationship between these two threads!
Thank you,
-BBD
I posted to this thread already on the topic:http://www.concrete5.org/community/forums/customizing_c5/page_list_...
Sorry to post twice, but there's a relationship between these two threads!
Thank you,
-BBD
However, I can offer you a possibly better solution: just use the PageList class directly. For example, this code should do what you want, and give you a bit more control (although you'll probably have to tweak it somewhat):