OpenWGA 7.1 - WebTML reference
WebTML tags<tml:image>
Description :
Renders an HTML Image displaying a file from a file container or content document
Attributes:
Name | Value(s) | Purpose | |
cssclass | css-class | Specifies an css class for the image | |
cssstyle | css-style |
Specifies a css style definition for this image. |
|
db | database-key | Determines the database that contains the image file. | |
derivate | derivate-query | Lets the image tag load a file derivate of the image instead of the original | |
doc | filecontainer-id | Name of a file container in the current database. If this is omitted the image file will be retrieved from the current content document. Equal to the attribute "name". | |
file | file-name | Name of the image file. Identical to the attribute "src" | |
html_attribute | html-value | Defines a custom HTML attribute that will be added to the generated HTML tag <image> | |
item | item-name |
Load and saves informations for an image file to display to/from an item |
|
label | label-text |
Only effective with attribute "item". Specifies a description that is displayed in browser if the image is not specified. |
|
maxheight | pixel | Scales the displayed image down to the given maximum height | |
maxwidth | pixel | Scales the displayed image down to the given maximum width | |
name | filecontainer-name | Equal to attribute "doc". | |
src | file-name | Identical with attribute "file". |
Details:
The image to show can be determined in two ways:
- Determine staticly in design by specifying filecontainer and file with attributes doc and file
- Load image to display from an item of the context document with attribute item
In the second case the tag <tml:Image> will offer and Editor to choose the image when editing a document in Content Manager. Additionally attribute label can be used to determine the text shown on the image editor control.
The content of this <tml:image> tag is inserted into the created <img> tag:
<tml:image doc="x" file="y.png">alt="My Image"</tml:image>
Creates:
<img src="..." alt="My Image">
The attributes maxwidth and maxheight can be used to trigger the online scaling functionality of OpenWGA, which will result in displaying downscaled images.
<tml:image doc="logos" file="mylogo.jpg"/>
creates <img src="url to the picture">
<tml:image doc="logos" file="mylogo.jpg">border="1"</tml:image>
creates <img src="url to the logo" border="1">