h2o-php icon indicating copy to clipboard operation
h2o-php copied to clipboard

Smarty like template Pools

Open ghost opened this issue 13 years ago • 3 comments

Supports smarty like template pools and loading from specific pool

after setting the search path array to somethink like this

array( "pool1" => "errorpages/", "pool16" => "templates9/" )

for example fetch a template with the filename "[pool16]index.html"

and it will look in the pool16 directory for the file first. If no [poolname] is given it will normally look through all directories just as it was before.

ghost avatar Dec 24 '12 22:12 ghost

why don't you specify both as search path (errorpages/ and /templates9)

speedmax avatar Dec 29 '12 23:12 speedmax

What happens if the file exists in both directorys? I have a addon system and each addon has a template dir. There will often be identical template names like view.tpl - settings.tpl. I wont get the correct file if a can't tell which dir should be used.

ghost avatar Jan 05 '13 18:01 ghost

Shouldn't they be specify in the actually template itself.

extends "path1/template" extends "path2/template"

Or provide the load path in order you wish

Sent from my iPhone

On 05/01/2013, at 10:11 AM, Dragonbleapiece [email protected] wrote:

What happens if the file exists in both directorys? I have a addon system and each addon has a template dir. There will often be identical template names like view.tpl - settings.tpl. I wont get the correct file if a can't tell which dir should be used.

— Reply to this email directly or view it on GitHub.

speedmax avatar Jan 05 '13 19:01 speedmax