I am developing a plugin where I need to access a page using its route.
Here is the code I use:
However when I try to do this in Admin Panel, it returns null.
After a bit of debugging I found out that
$this->grav['pages'] does not contain any pages when in Admin Panel.
Is this supposed to happen? If so, how can I access pages when in Admin Panel? If not, what could be causing it?
Thanks in advance.