Page 3 of 3

Re: [solved] list posts // all | by tags

Posted: Wed Sep 05, 2018 1:12 am
by kaaleth
Edi wrote: Mon Aug 06, 2018 12:56 pm By the way, you can find the code snippet to list all pages in the documentation:

https://docs.bludit.com/en/developers/content-pages

And the code snippet for all static pages:

https://docs.bludit.com/en/developers/c ... atic-pages
I have checked those tips out but I am getting error:

> Undefined variable: dbPages in
> Fatal error: Call to a member function getList() on null

I am using Bludit 3 RC2.

Re: [solved] list posts // all | by tags

Posted: Wed Sep 05, 2018 11:40 am
by Edi
This part of the documentation is not yet updated. :oops:

Try the following:

Code: Select all

$publishedPages = $pages->getList($pageNumber, $numberOfItems, $onlyPublished);
instead of

Code: Select all

$pages = $dbPages->getList($pageNumber, $amountOfItems, $onlyPublished);
And

Code: Select all

foreach ($publishedPages as $pageKey) {
instead of

Code: Select all

foreach ($pages as $pageKey) {

Re: [solved] list posts // all | by tags

Posted: Wed Sep 05, 2018 1:05 pm
by kaaleth
Yeah, I thought so. Anyway, thanks I will try the code and give you a feedback.