3 ms·
Why not just use a sub-template model then? Where you have a "page" template that includes the "header", "content" and "footer" template, possibly even decided
by nightpool 14y ago
Why not just use a sub-template model then? Where you have a "page" template that includes the "header", "content" and "footer" template, possibly even decided at runtime?
- sorbits 14y agoSuch solution require much of the page-building logic (loops, conditions) to be moved into the template language, and the state transfer that goes with it. This means trivial tasks require editing multiple files, e.g. say we introduce pagination: the master template now need to be told by the controller, if it should include the “page n of m” template. I assume ufo avoids this problem (and the limited capabilities of template languages wrt. logic) by instead using host language libraries to generate the HTML, but IMO that has the downside of limited interoperability, as the templates are then just code written for some library.