Gossamer Forum
Home : Products : Gossamer Links : Discussions :

template directory

Quote Reply
template directory
Alex,

A plug-in may want to install their templates in their own subdirectory.

By using the new ::display routine, you can print any template (figured that one out) but you can't pass in a new template directory.

I overrode $IN->param('t') to do it, but that is not the proper way, if you want to dynamically preserve the regular template set.

Maybe there should be a way of passing in a template directory to the load_template routine, which would override (but not obliterate) the existing defaults.

I don't know enough of the logic to say it should be a passed parameter (probably logically the best) or whether setting a param->('u') (for example) would be a better way. I think since it would be a per-call basis, the directory override would be the best way.

I tried passing in "/path/filename.html" but it couldn't parse the name to generate the print sub.

With the ../templates/ directory, it makes sense for a plug-in to set it's templates into a ../templates/plug-in_name directory. Prevents template collisions, and keeps it easy to uninstall.

Some way of passing in the default override would be nice :)

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Subject Author Views Date
Thread template directory pugdog 5869 Dec 3, 2000, 9:51 PM
Thread Re: template directory
pugdog 5761 Dec 3, 2000, 10:43 PM
Thread Re: template directory
Alex 5749 Dec 4, 2000, 9:36 AM
Thread Re: template directory
pugdog 5753 Dec 4, 2000, 12:03 PM
Thread Re: template directory
Alex 5737 Dec 4, 2000, 12:17 PM
Thread Re: template directory
pugdog 5739 Dec 4, 2000, 12:50 PM
Post Re: template directory
Alex 5715 Dec 4, 2000, 1:04 PM
Thread Re: template directory
Alex 5728 Dec 4, 2000, 1:09 PM
Thread Re: template directory
pugdog 5733 Dec 4, 2000, 1:39 PM
Thread Re: template directory
Alex 5709 Dec 4, 2000, 2:55 PM
Thread Re: template directory
pugdog 5711 Dec 4, 2000, 9:56 PM
Thread Re: template directory
Alex 5678 Dec 6, 2000, 1:24 PM
Post Re: template directory
pugdog 5670 Dec 6, 2000, 3:55 PM
Thread Re: template directory
Alex 5730 Dec 4, 2000, 9:35 AM
Post Re: template directory
pugdog 5748 Dec 4, 2000, 12:10 PM