[Bins] How to use TMPL_VAR NAME=FILE_NAME in imagelist.html
template?
Jérôme SAUTRET
jerome at sautret.org
Sun Feb 23 18:01:16 GMT 2003
On Sun, Feb 23, 2003 at 12:04:29PM +0000, Chris Croome wrote:
> Hi
>
> I'm getting to the stage of customising the templates where I need
> to start prodding the code in places :-)
>
> I want to use this variable:
>
> <!-- TMPL_VAR NAME=FILE_NAME -->
>
> In this loop:
>
> <!-- TMPL_LOOP NAME=IMAGE_LIST_TABLE -->
>
> In the imagelist.html template. I want to get the filename because,
> once I have given it a prefix like, "thumb-" it will make a good
> frag ID since I don't use spaces in filenames ( I juess I could use
> a scaled filename for this also).
>
> I have done a quick grep of the code but it's been a long time since
> I did any Perl and I'm not sure what I would need to do.
>
> Anyone got any suggestions?
I'm not sure to understand what you want to do, but the table
referenced by IMAGE_LIST_TABLE doesn't contain the filename, so you
have to add it in the generateImageListPage function, by adding
something like
$tablesubs{FILE_NAME} = $imageInfo{basename};
somewhere in the
foreach my $imageInfoRef (@imageData) {
loop.
> One other question, what is the number for in the HTML filename, eg:
>
> http://album.sautret.org/300_lieux/500_Paris/IMG_4175_Pt.jpg.1.html
> ^
> |
> What is this digit for? ---------------------------------------/
Hum, this is a good question...
> It's not needed to make the filename unique since the image file
And the file name of the image doesn't have this number.
> name is already and it's not needed to order the pages as far as I
> can tell.
This is just the index of the loop... Can anybody find a
usage for this number ? :-)
--
Jérôme SAUTRET (Jerome at SAUTRET.org) http://SAUTRET.org
Key 0x95D463F3 fingerprint 3B69 3B60 4D32 B8DF 2BF3 8035 5036 D41A 95D4 63F3
More information about the Bins
mailing list