vGalleries Template Tags
vGalleries Home

vGalleries Overview
File Manager Rules and Regulations
Help Index
Creating Your Own Templates
vGalleries Template Tags
Jakarta XTags library docs

Log in
Help!
Below is a description of each of the vGalleries template tags used to create your own templates.


  • <ipa:ifGalleryVarEquals>
  • <ipa:ifGalleryVarExists>
  • <ipa:ifNextGalleryCaptionExists>
  • <ipa:ifPictureNumberExists>
  • <ipa:ifPictureVarEquals>
  • <ipa:ifPictureVarExists>
  • <ipa:insertGalleryAttribute/>
  • <ipa:insertGalleryVar/>
  • <ipa:insertMenu/>
  • <ipa:insertNextGalleryCaption/>
  • <ipa:insertPictureAttribute/>
  • <ipa:insertPictureVar/>
  • <ipa:linkMemberHomePage>
  • <ipa:loopPictures>
  • These tags are typically only used in home-gallery or gallery-list templates:

  • <ipa:insertFromGalleryList/>
  • <ipa:loopGalleryList>
  • These tags are typically only used in image templates:

  • <ipa:insertFooter/>
  • <ipa:linkAddToCollection>

  • ipa:ifGalleryVarEquals

    Usage:

    <ipa:ifGalleryVarEquals varName="variable" value="value" [galleryID="galleryid"]>

    Body: yes

    Description:

    Used to test if the specified gallery variable equals the provided value. Note that the comparison is case-insensitive! Use this tag to insert HTML into the page conditional upon a variable's value.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example: inserts the counter if the gallery has a variable indicating the counter should be displayed.

    	<ipa:ifGalleryVarEquals varName="COUNTER_CHECKBOX" vale="true">
    		You are visitor <ipa:insertCounter/>
    	</ipa:ifGalleryVarEquals>
    	

    ipa:ifGalleryVarExists

    Usage:

    <ipa:ifGalleryVarExists varName="variable" [galleryID="galleryid"]>

    Body: yes

    Description:

    Used to test if the specified gallery variable exists. Use this tag to insert HTML into the page conditional upon a variable existing.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example: insert an image only if the variable LOGO is defined (in conjunction with <ipa:insertGalleryVar>)

    	<ipa:ifGalleryVarExists varName="LOGO">
    		<img src="<ipa:insertGalleryVar varName="LOGO"/>">
    	</ipa:ifGalleryVarExists>
    	

    ipa:ifNextGalleryCaptionExists

    Usage:

    <ipa:ifNextGalleryCaptionExists [varName="variable"] [captionNumber="number"] [doInc="true | false"] [galleryID="galleryid"]>

    Body: yes

    Description:

    Used to test if the next gallery caption exists Use this tag to insert HTML into the page conditional upon a caption existing. Takes the following parameters:

  • varName - the name of the variable used for counting captions associated with this tag. Defaults to "_captionnumber"
  • captionNumber - explicitly sets the caption number, overwriting the value stored in the varName variable
  • doInc - indicates whether or not the processing of this tag should increment the caption number
  • galleryid - the id of the gallery to process the captions for

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example: if a caption exists, end the current table, insert the caption, and restart the table

    	<ipa:ifNextGalleryCaptionExists>
    		</table>
    		<ipa:insertNextGalleryCaption doInc="false"/>
    		<table>
    	</ipa:ifNextGalleryCaptionExists>
    	

    ipa:ifPictureNumberExists

    Usage:

    <ipa:ifPictureNumberExists pictureNumber="number [galleryID="galleryid"]">

    Body: yes

    Description:

    Used to test if a given picture number exists. Use this tag to insert HTML into the page conditional upon a picture existing. For example, this tag can be used in home-gallery templates to determine if the owner has added a picture to their homepage or not. Remember that picture numbering in a template starts with '0'

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example:

    	<ipa:ifPictureNumberExists pictureNumber="0">
    		<ipa:insertPictureAttribute attr="title"/>
    		<p>
    		<ipa:insertPictureAttribute attr="thumbnail"/>
    		<br>
    		<ipa:insertPictureVar varName="DESCRIPTION"/>
    	</ipa:ifPictureNumberExists>
    	

    ipa:ifPictureVarEquals

    Usage:

    <ipa:ifPictureVarEquals varName="variable" value="value" [galleryID="galleryid"] [pictureID="pictureid"]>

    Body: yes

    Description:

    Used to test if the specified picture variable equals the provided value. Note that the comparison is case-insensitive! Use this tag to insert HTML into the page conditional upon a variable's value.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    If you use this tag inside an image template and do not specify the picture id in the tag, the tag will look for the pictureid as a request parameter

    Example: inserts the text "NEW!" in bold if the picture has a variable saying it is new.

    	<ipa:ifPictureVarEquals varName="ISNEW" vale="true">
    		<b>NEW!</b>
    	</ipa:ifPictureVarEquals>
    	

    ipa:ifPictureVarExists

    Usage:

    <ipa:ifPictureVarExists varName="variable" [galleryID="galleryid"] [pictureID="pictureid"]>

    Body: yes

    Description:

    Used to test if the specified picture variable exists. Use this tag to insert HTML into the page conditional upon a variable existing.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    If you use this tag inside an image template and do not specify the picture id in the tag, the tag will look for the pictureid as a request parameter

    Example: insert additional text only if the variable FILMTYPE is defined (in conjunction with <ipa:insertPictureVar>)

    	<ipa:ifPictureVarExists varName="FILMTYPE">
    		Film I used for this picture: <img src="<ipa:insertPictureVar varName="FILMTYPE"/>">
    	</ipa:ifPictureVarExists>
    	

    ipa:insertGalleryAttribute

    Usage:

    <ipa:insertGalleryAttribute attr="attrname" [galleryID="galleryid"]/>

    Body: no

    Description:

    Inserts an attribute of a gallery into the page. Valid attributes are:

  • title
  • memberid
  • createdate
  • modifydate
  • If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example:

    	<ipa:insertGalleryAttribute attr="title"/>
    	

    ipa:insertFooter

    Usage:

    Body: no

    Description:

    This tag is used to insert the vGalleries menu footer into image-type templates. THIS TAG IS MANDATORY FOR IMAGE TEMPLATES.

    IMPORTANT: For all other templates other than those of type image, use tag ipa:insertMenu instead!

    Example:

    	<ipa:insertFooter/>
    	

    ipa:insertFromGalleryList

    Usage:

    <ipa:listGallery attr="attrname [galleryNumber="number"] [showHomeGallery="true | false"] [galleryID="galleryid"]"/>

    Body: no

    Description: Used to display information about the gallery owner's other galleries. Typically used inside a <ipa:loopMyGalleries> tag.

    Valid attributes are:

  • title - the title of the gallery
  • link - the link to the gallery
  • createdate - the date that the gallery was created
  • modifydate - the date that the gallery was last modified
  • memberid - the memberid of the gallery owner
  • galleryid - the id of the gallery to display the pictures for

    The parameter "galleryNumber" allows you to move to the specified gallery number. Galleries are numbered starting from '0'. The parameter "showHomeGallery" is used to indicate whether the owner's home gallery should be included in any gallery list. It defaults to false.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example: display links to all of the gallery owner's other galleries

    	<ipa:loopGalleryList>
    		<ipa:insertFromGalleryList attr="link"/>
    	</ipa:loopGalleryList>
    	

    ipa:insertGalleryVar

    Usage:

    <ipa:insertGalleryVar varName="variable [galleryID="galleryid"]"/>

    Body: no

    Description:

    Inserts a variable of a gallery into a page. Remember that the variables that a particular gallery has will depend on the template used for that gallery. Typically, most templates will have at least have the variables HEADING1 and DESCRIPTION.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example:

    	<ipa:insertGalleryVar varName="HEADING1"/>
    	

    ipa:insertMenu

    Usage:

    <ipa:insertMenu/>

    Body: no

    Description:

    This tag is used to insert the vGalleries menu into all templates except image-type templates. THIS TAG IS MANDATORY IN ALL TEMPLATES (except those of type image).

    IMPORTANT: For templates of type image, use tag ipa:insertFooter instead!

    Example:

    	<ipa:insertMenu/>
    	

    ipa:insertNextGalleryCaption

    Usage:

    <ipa:insertNextGalleryCaption [varName="variable"] [captionNumber="number"] [doInc="true | false"] [galleryID="galleryid"]>

    Body: no

    Description:

    Insert the next gallery caption into the page. Takes the following parameters:

  • varName - the name of the variable used for counting captions associated with this tag. Defaults to "_captionnumber"
  • captionNumber - explicitly sets the caption number, overwriting the value stored in the varName variable
  • doInc - indicates whether or not the processing of this tag should increment the caption number
  • galleryid - the id of the gallery to process the captions for

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example: insert the next caption in the gallery, use the specified variable to track caption numbers, but do not increment the counter

    	<ipa:insertNextGalleryCaption varName="mycaptioncounter" doInc="false"/>
    	

    ipa:insertPictureAttribute

    Usage:

    <ipa:insertPictureAttribute attr="attrname" [pictureNumber="number"] [galleryID="galleryid"] [pictureID="pictureid"]/>

    Body: yes (only for the openahref attribute from within gallery templates)

    Description:

    Inserts an attribute of the current picture in the gallery or image template. Typically used inside an <ipa:loopPictures> tag or inside an image template.

    Valid attributes are:

  • title - the title of the picture
  • memberid - the memberid of the picture's owner
  • createdate - the date the picture was added to vGalleries
  • modifydate - the date the picture's properties were last updated
  • thumbnail - the <img src="..."> tag to the thumbnail
  • image - the <img src="..."> tag to the picture
  • ahref - the link to the picture's image template, using the title as the body
  • openahref - the link to the picture's image template, using the provided tag body as the body
  • pictureid - the vGalleries id of the picture

    If you do not use this tag inside a loopPictures tag, you can explicitly set the picture number in the gallery with the pictureNumber attribute.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    If you use this tag inside an image template and do not specify the picture id in the tag, the tag will look for the pictureid as a request parameter

    Example: insert the picture's title

    	<ipa:insertPictureAttribute attr="title"/>
    	

    ipa:insertPictureVar

    Usage:

    <ipa:insertPictureVar varName="variable [pictureNumber="number"] [galleryID="galleryid"] [pictureID="pictureid"]/>

    Body: no

    Description:

    Inserts a variable of the current picture into the page. Remember that the variables that a particular picture has will depend on the template for the galleries that the picture is included in. Typically, most pictures will at least have the variable DESCRIPTION.

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    If you use this tag inside an image template and do not specify the picture id in the tag, the tag will look for the pictureid as a request parameter

    Example:

    	<ipa:insertPictureVar varName="DESCRIPTION"/>
    	

    ipa:linkAddToCollection

    Usage: <ipa:linkAddToCollection [pictureID="pictureid"]>

    Body: yes

    Description:

    Used to insert a link to the addtocollection page for the current picture. This tag is typically used in image templates, to allow the viewer to add the picture to one of his/her collections.

    If you do not specify the picture id in the tag, then the tag will look for pictureid as a request parameter

    Example:

    	<ipa:linkAddToCollection>Add this to your collection</ipa:linkAddToCollection>
    	

    ipa:linkMemberHomePage

    Usage:

    <ipa:linkMemberHomePage>

    Body: yes

    Description:

    Inserts a link to the homepage of the gallery/picture owner

    Example:

    	<ipa:linkMemberHomePage>Return to my homepage!</ipa:linkMemberHomePage>
    	

    ipa:loopGalleryList

    Usage:

    <ipa:loopGalleryList [varName="varname"] [start="number"] [end="number"] [inc="number"] [loops="number"] [galleryID="galleryid"]>

    Body: yes

    Description: Used to loop through the various galleries in a gallery list. Typically used for home-gallery or gallery-list templates to show links (in combination with ipa:insertFromGalleryList) to the owner's other galleries.

    Takes the following parameters:

  • varName - the name of the variable associated with this loop. Defaults to "_loop_my_galleries_count"
  • start - the gallery number to start the loop with (the first gallery is '0', etc.). Defaults to '0'
  • end - the gallery number to end the loop with. Defaults to the last gallery
  • inc - the loop increment to use on each iteration. Defaults to '1'.
  • loops - the number of iterations to use. Defaults to the same value as the end attribute
  • galleryid - the id of the gallery to display the pictures for

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example: display links to all of the gallery owner's other galleries

    	<ipa:loopMyGalleries>
    		<ipa:listGallery attr="link"/>
    	</ipa:loopMyGalleries>
    	

    ipa:loopPictures

    Usage:

    <ipa:loopPictures [varName="varname"] [start="number"] [end="number"] [inc="number | nested"] [loops="number"] [galleryID="galleryid"]>

    Body: yes

    Description:

    Used to loop through all of the pictures in the gallery. Takes the following parameters:

  • varName - the name of the variable associated with this loop. Defaults to "_count"
  • start - the picture number to start the loop with (the first picture is '0', etc.). Defaults to '0'
  • end - the picture number to end the loop with. Defaults to the last picture in the gallery
  • inc - the loop increment to use on each iteration. Defaults to '1'. A value of "nested" indicates that a nested loop tag will determine the increment.
  • loops - the number of iterations to use. Defaults to the same value as the end attribute
  • galleryid - the id of the gallery to display the pictures for

    If you do not specify the gallery id in the tag, then the tag will look for galleryid as a request parameter

    Example 1: loop through and insert all of the picture thumbnails in the gallery

    	<ipa:loopPictures>
    		<p><ipa:insertPictureAttribute attr="thumbnail"/>
    	</ipa:loopPictures>
    	

    Example 2: loop through all of the pictures in the gallery, displaying 3 pictures per row

    	<ipa:loopPictures inc="nested">
    		<ipa:loopPictures varName="innerloop" loops="3">
    			<ipa:insertPictureAttribute attr="thumbnail"/>
    		</ipa:loopPictures>
    		<p>
    	</ipa:loopPictures>
    	

    This page was last updated on June 4, 2002