Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve getChunk to allow file based and inline tpl #14201
The getChunk method from pdoTools allows you to use file based and inline tpl's. So it doesn't require a modChunk reference in the database.
I think the core getChunk method should be improved to allow also file based and inline TPLs and would like to know who else would like to see this improvement into the core of MODX.
pdoTools uses a system setting for the base path of where all static elements live, the new core system setting
Why is it needed?
We like to work file based and for performance it would be better if we can bypass the database when working file based. And also for small templates it can be a lot easier to create an inline TPL then creating a new modChunk snippet for it in the database.
In short, it makes life easier and is also faster.
I think the getElement method in the modParser class should be changed to also support file based and inline tpls.
What do you guys think about the idea and the suggested solution?