[Templates-cvs] cvs commit: Template2/docsrc/src/Modules/Template/Plugin Image.tt2
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/01/30 14:44:32
Modified: docsrc/src/Modules/Template/Plugin Image.tt2
Log:
* documented root option
Revision Changes Path
1.4 +11 -0 Template2/docsrc/src/Modules/Template/Plugin/Image.tt2
Index: Image.tt2
===================================================================
RCS file: /template-toolkit/Template2/docsrc/src/Modules/Template/Plugin/Image.tt2,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Image.tt2 2003/03/18 00:14:06 1.3
+++ Image.tt2 2006/01/30 14:44:32 1.4
@@ -24,6 +24,17 @@
[% USE image(name='baz.gif') %]
[% USE Image name='pong.gif' %]
+A "root" parameter can be used to specify the location of the image file:
+
+ [% USE Image(root='/path/to/root', name='images/home.png') %]
+ # image path: /path/to/root/images/home.png
+ # img src: images/home.png
+
+In cases where the image path and image url do not match up, specify the
+file name directly:
+
+ [% USE Image(file='/path/to/home.png', name='/images/home.png') %]
+
You can also provide an alternate name for an Image plugin object.
[% USE img1 = image 'foo.gif' %]