getImage: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
==Function getImage==
{{MacroFunction
Returns the [[asset id]] for the image of an [[Token:Image Token]].  
|name=getImage
|description=Returns the [[asset id]] for the image of an [[Token:Image Token]].  


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: asset = getImage(name)]
[h: asset = getImage(name)]
</source>
</source>


===Examples===
|example=
To display the image from an [[Token:image token|image token]] called "image:Map" you can do the following
To display the image from an [[Token:image token{{!}}image token]] called "image:Map" you can do the following
<source lang="mtmacro" line>
<source lang="mtmacro" line>
<img src="[r: getImage('image:Map')]"></img>
<img src="[r: getImage('image:Map')]"></img>
</source>
</source>
}}
[[Category:Miscellaneous Function]]

Revision as of 03:25, 7 March 2009

getImage() Function

Returns the asset id for the image of an Token:Image Token.

Usage

[h: asset = getImage(name)]

Example

To display the image from an image token called "image:Map" you can do the following
<img src="[r: getImage('image:Map')]"></img>