Closed medienbaecker closed 3 years ago
I did a quick proof-of-concept and it works. Kirby has the Kirby\Cms\Pages
collection class. I created a basic ModulesCollection
class that extends Pages
and implements the toString
method by rendering all modules. toArray()
is already taken care of by the Pages
class.
Creating a modules
page method that returns an instance of ModulesCollection
would do the trick.
Let me know if you would be interested in a PR.
That sounds really promising, Pedro! This way the modules plugin would work like the new builder 👍
It would be great to have a
modules()
method which would work like therenderModules()
method but also allow loops.