Re: [Templates] Accessing files from templates

[prev] [thread] [next] [Date index for 2005/01/30]

From: Perrin Harkins
Subject: Re: [Templates] Accessing files from templates
Date: 02:56 on 30 Jan 2005
On Sat, 2005-01-29 at 22:22 +0100, Johan Vromans wrote:
> Template::Plugin::Directory is a good start, but unfortunately it has
> a different view on the file system than would be intuitive. For
> example, to show all images in the current directory:
> 
>   USE dir = Directory(dirpath);
>   FOREACH file = dir.files;
>     '<img src="' _ file.name _ '">";
>   END;
> 
> The problem is how to get the right value for dirpath.

I'd suggest you just hack this plugin to do what you want.  Take a look
at the code and ask questions if you get stuck.

- Perrin


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

(message missing)

[Templates] Accessing files from templates
Johan Vromans 21:22 on 29 Jan 2005

Re: [Templates] Accessing files from templates
Perrin Harkins 02:56 on 30 Jan 2005

[Templates] Re: Accessing files from templates
Johan Vromans 08:46 on 30 Jan 2005

Re: [Templates] Re: Accessing files from templates
Perrin Harkins 14:13 on 30 Jan 2005

Re: [Templates] Accessing files from templates
merlyn (Randal L. Schwartz) 12:14 on 30 Jan 2005

Re: [Templates] Accessing files from templates
Vivek Khera 04:10 on 31 Jan 2005

Re: [Templates] Accessing files from templates
merlyn (Randal L. Schwartz) 20:09 on 31 Jan 2005

Re: [Templates] Accessing files from templates
Vivek Khera 20:38 on 31 Jan 2005

Re: [Templates] Accessing files from templates
merlyn (Randal L. Schwartz) 21:04 on 31 Jan 2005

Re: [Templates] Accessing files from templates
Josh Rosenbaum 20:59 on 31 Jan 2005

Re: [Templates] Accessing files from templates
merlyn (Randal L. Schwartz) 21:01 on 31 Jan 2005

Re: [Templates] Accessing files from templates
Mark Mills 23:03 on 31 Jan 2005

Re: [Templates] Accessing files from templates
Josh Rosenbaum 23:40 on 31 Jan 2005

Re: [Templates] Accessing files from templates
Bill Moseley 22:05 on 02 Feb 2005

Re: [Templates] Accessing files from templates
Bill Moseley 16:49 on 30 Jan 2005

RE: [Templates] Accessing files from templates
Jason Gottshall 18:15 on 31 Jan 2005

Re: [Templates] Accessing files from templates
merlyn (Randal L. Schwartz) 19:14 on 01 Feb 2005

Re: [Templates] Accessing files from templates
Josh Rosenbaum 21:40 on 31 Jan 2005

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52