Posts: 55
Threads: 19
Joined: Apr 2018
Reputation:
0
I would like to store templates in a database and then use them with a tiwTemplateProcessHTML.
Does anyone know if it is possible to load a template from a database directly to a stream and have a tiwTemplateProcessorHTML use it without having to first save the file to the template location on the disk?
Posts: 1,136
Threads: 37
Joined: Mar 2018
Reputation:
30
Location: Limassol, Cyprus
The template processor comes with full source and is pluggable. You can easily it to do as you wish with very little code required.
Posts: 1,136
Threads: 37
Joined: Mar 2018
Reputation:
30
Location: Limassol, Cyprus
Thanks. We are working hard on 17 and will be shipping a limited alpha this month.
Posts: 2,300
Threads: 203
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
Actually I'd add it to ServerInternalFiles list so it is always in memory which makes loading mega fast and every time your application dies, the template goes along with it. You can use the event to load from ServerInternalFiles list.
If you prefer to save it to disk, I don't see any issues if you decide do save it to cache folder