Closed cyanonoob closed 4 years ago
Just saw part of my fixes was also referenced in a different pull request, was a bit overeager I'm afraid. The other part still stands, though :)
to expand on this, grav plugins now have their own autoload function. You can test/see example by running a new plugin bin/plugin devtools new-plugin
command. It would require the src
folder to be renamed classes
and the composer.json file to be added for autoloading
Fixed with another PR. Thanks though! Regarding the !$page
, I found another solution. Rather than using instances() we should use all(). This also fixes some pages that were not shown.
There were some issues using this plugin in 1.7. I renamed the autoload-function as that's now also used within Grav, and I added a check on $page so that there's no attempts at calling methods on a null value. Should work again (it does here)!