Grav\Common\Page\Pages getlist() returns empty array

Hi !
In the blueprint of one of my pages I use this extended blueprint form :

data-options@: '\Grav\Theme\MyTheme::Myfonction'

In MyTheme.php, I try to display an array of all the pages in the website with this line:
Grav::instance()["pages"]->getList()

Unfortunately it returns an empty array. I tried to implement this code on another one of my websites and its works like a charm.

So I looked at my folder permission, I used the “permission-fix” script provided in the documentation.
I found the function getList in system/src/Grav/Common/Page/Pages.php line 1156, but I found no clues.

Does anyone know why it will display a list of pages on one website but not the other ? And what can I do to fix this problem or at least retrieve some log/info.

cheers,

I found the solution :

To adapt it in Theme.php I did :

Grav::instance()['admin']->enablePages();

:slight_smile: