content:assetUrlFromString

This tag will get you an asset url by storing the string you supply as a file in the asset directory and returning an url to it.

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

data

true

 

Object/String

The string you want to get written to file.

fileNamePrefix

true

 

Object/String

The start of the filename.

fileNameSuffix

true

 

Object/String

The file suffix.


ID-result variable contains: An string containing the url to the asset/file.

Examples

The following example writes the string to an asset with the prefix “MyTest” and suffix “txt”.

<content:assetUrlFromString id="myAssetUrl" data="I just want to test this feature" filePrefix="MyTest" fileSuffix="txt"/>
<img src="<c:out value="${myAssetUrl}"/>"/>



comments powered by Disqus