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
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