Difference between revisions of "Common:HTML IMG Tag"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - '__NOINDEX__' to '<noinclude>__NOINDEX__</noinclude>')
imported>Aeric
m (Text replace - '”' to '"')
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>__NOINDEX__</noinclude>
<noinclude>__NOINDEX__</noinclude>
To insert an image into a Print Template, use the platform <tt>IMG</tt> tag in an HTML <tt>img</tt> element.  
To insert an image into a Document Template, use the platform <tt>IMG</tt> tag in an HTML <tt>img</tt> element.  


;HTML Tag:
;HTML Tag:
Line 7: Line 7:


;Example:
;Example:
:<tt><nowiki><img src=”IMG{$Customer.logo_image}></nowiki></tt>
:<tt><nowiki><img src="IMG{$Customer.logo_image}"></nowiki></tt>

Latest revision as of 19:44, 31 July 2013

To insert an image into a Document Template, use the platform IMG tag in an HTML img element.

HTML Tag
<img src="...IMG tag...">
IMG Tag
IMG{$objectName.imageFieldName}

where:

  • objectName - The name of the current object. (This variable is in Velocity format. The object name effectively creates a namespace, ensuring that there is no conflict with another variable that might have the same name.)
  • imageFieldName - The name of the field in the current record that contains the image to display, joined to the object name by a "dot" (.).

Warn.png

Important: This syntax uses braces: {...}. The braces and other underlined characters in this syntax are literals. Type them in exactly as shown.

Result
The URL for the image is inserted into the generated page. When viewed, the image is displayed.
Example
<img src="IMG{$Customer.logo_image}">