rsanchez/pre_embed — Issue #6: Templates as files not working
Author: GDmac
Created: 2012-02-07 13:14:04+00:00
State: open

Because pre_embed first checks the database for the requested template, some templates are missed.
e.g. if you save a file directly to the template dir, it is not in the database yet.
You either have to visit the template manager or load the template in a browser first.

The file need not be in the database (yet), maybe...
- first check for config->item('save_tmpl_files')
--- (no) fetch from database, done
--- (yes) check file_exists($basepath)
- found file?
--- (yes) use file, done
--- (no) use database

I haven't looked at the template library if it is possible that it fetches the template?
(or is that to much overhead?)