By SOMO Creative on Tuesday, 09 August 2016
Posted in General Issues
Replies 3
Likes 0
Views 369
Votes 0
I would like to create custom pagination for my blog. I want to access a pagination object. Currently the $pagination variable in /blogs/categories/item.php is a string and I can't find where it's being defined.

Is there a way to get the current pagination as a stdClass object?
That $pagination valuable defined it from this file JoomlaFolder\components\com_easyblog\views\categories\view.html.php



$pagination = $model->getPagination();

And this above code is general the std class object, and the function is getting from this following file :
JoomlaFolder\administrator\components\com_easyblog\models\category.php

Hope this will help.
·
Tuesday, 09 August 2016 11:29
·
0 Likes
·
0 Votes
·
0 Comments
·
HI Arlex,
I finally got around to looking at this again.

I ended up adding this line to /com_easyblog/views/categories/view.html.php @ line 240, just before the $pagination variable is converted to a string.

$this->set('paginationobject', $pagination);


Then I could access the original pagination object in the override -> template/html/com_easyblog/blogs/categories/item.php

Now I can hand the pagination over to Javascript for an Ajax based 'load more'.

You can see it in action here, if you're interested http://192.185.111.48/~cityscapedev/blog/food-drink

Thanks.
Tristan.
·
Wednesday, 07 September 2016 11:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Tristan,

Look great ! Thanks for sharing.
·
Wednesday, 07 September 2016 14:13
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post