|
I raised the question of providing easy access to data in data module in this Jira task: MGNLSTK-435
In this task i suggested something like general model classes to use.
Now another idea/possibility came up in my mind:
Why not providing a quite complete set of methods in the STKUtil and having them documented well. Something like a lib for STK templates.
But they would need to be well documented, because the STKUtil provides already (as the MagnoliaUtil 'mgnl') a set of helper methods, but I'm sure most don't know anything about it/would know how to find out.
Pros:
- Every stk freemaker template has automatically the object 'stk'
- Still a paragraph can have its specific model class and using the stk methods
- Another reason to use STK freemarker templates and not using your complete own templates.
- A good set could be quite easy provided which boosts the possibilities you can do in a freemarker template without having to code Java.
- There is already a set of methods in it, but mostly only regarding resolving links/image-links
Cons:
- it must be documented well that there is a real use/gain of it.
|