kaffa / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Ability to change form template reading behaviour #362

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
One of the requested features since ever been moving templates outside 
database. Textpattern is database oriented, and it's safe to assume that is not 
going to change.

Instead, we could offer an actual ways to extend the reading behavior on the 
template side of things. The coolest aspect about Textpattern are callbacks, 
and adding a callback for routing form template reading would be beneficial. 
Not just for changing the fetch_form() to read templates from flat files, but 
also to offer other crazy logics like on-the-fly processing or what ever a 
developer wants a form to do.

Todo:

* Add a 'form.fetch' callback event to the fetch_form(). If the event has an 
handler, it overrides the default database lookup. Other option would be 
referencing, but it doesn't have big benefit unless the db read is always done 
before the passing the results to the callback handler.
* In the future look into adding logic for page templates and parsing too.

Original issue reported on code.google.com by jukka.m.svahn on 15 Feb 2013 at 11:36

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r5226.

Original comment by jukka.m.svahn on 15 Feb 2013 at 11:40