[solved] list posts // all | by tags

kaaleth
Master Bludit
Posts: 117
Joined: Sun Jun 14, 2015 9:55 am

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.
User avatar
Edi
Site Admin
Posts: 3120
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

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) {
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
kaaleth
Master Bludit
Posts: 117
Joined: Sun Jun 14, 2015 9:55 am

Yeah, I thought so. Anyway, thanks I will try the code and give you a feedback.
Post Reply