medienbaecker / kirby-modules

Plugin for modular Kirby websites
MIT License
73 stars 7 forks source link

Make "modules" method stringable #26

Closed pedroborges closed 3 years ago

pedroborges commented 3 years ago

As discussed at #22. $page->modules() can now be used as an array or echoed as a string.

I haven't tested other methods.

medienbaecker commented 3 years ago

@pedroborges Thanks for the pull request ❤️

FYI: the modules() method was returning all the modules including drafts. I moved the token check from the renderModules() method and now it works fine 👍