For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > October 2006 > RE: [SMARTY] Refactoring templates folder









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [SMARTY] Refactoring templates folder
Eric Mueller

2006-10-30, 7:33 pm

I didn't even know about the array of paths! Cool.

> -----Original Message-----
> From: boots [mailto:jayboots@yahoo.com]
> Sent: Friday, October 27, 2006 10:20 AM
> To: smarty-general@lists.php.net
> Subject: Re: [SMARTY] Refactoring templates folder
>
> Although unsupported, you can make the templates_dir an array
> of paths. It is searched in order. So put the common
> templates (eg: templates/shared) first in the array. Another
> idea: use a custom resource (eg: shared:foo/bar.tpl) -- it
> means you have to rewrite your templates -- but only once.
> You can then simply modify your resource to retarget the
> template locations.
>
> xo boots
>
> Eric Mueller wrote:
> trying to break it
> $smarty->template_dir
> template itself, so I
> templates/shared, but then the
> templates/ ?
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low
> PC-to-Phone call rates.
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com