brendanmetzger / diatom

A template framework
1 stars 0 forks source link

static template config #36

Closed brendanmetzger closed 4 years ago

brendanmetzger commented 4 years ago

Consider setting templates as a static variable. Right now they are per set per instance, and then data is passed along to children when required by insert and yield.

setting with something like Template::set('toc', 'path/to/toc.html'); would allow:

A caveat is that templates become global, and I wonder how that would affect Request::GET stuff on sub requests. That could be resolved by appending the request ID as a key during set/yield call.. or something of that nature