ftlabs / fruitmachine

View rendering engine
MIT License
247 stars 18 forks source link

Add `before tohtml` event #64

Closed matthew-andrews closed 10 years ago

matthew-andrews commented 10 years ago

When I first added this event it felt a bit hacky and dirty - but it's actually turned out to be really useful as a way of hooking into the data model to add / manipulate data before rendering. (On initialize doesn't really cut it for data that changes and gets re-rendered often and the before render event only runs on the fm module that is being rendered - and doesn't get fired recursively over all of its children)