http://qs1969.pair.com?node_id=371108


in reply to HTML - separating design and logic

The point is not to keep ALL logic out of your template but to keep everything except display logic out. Your "another way" approach does not put any application logic (database work, user pref manipulation, etc.) in the template. Having to update both the Perl code and the templates when adding a new thing to be displayed is not a bad thing. There are always these two tasks (update code, update display) even if you have no separate templates.

By the way, I would make each nodelet a separate included template, and just pass a list of nodelet templates to include.