<@td.fileProperties>
The fileProperties tag stores an ItemDataAccess object
in @var that can be
used to interrogate the properties of a file.
If the file does not exist
or is not
accessible from the portal, no
value is stored in the variable.
This tag contains the following attributes:
-
harpUrl
- The ContentLocator. If specified, projectKey and
itemKey are
ignored.
- Required: false
- Type: ContentLocator
- Default: none
-
harpUrlString
- The ContentLocator as a string. If specified,
projectKey and
itemKey are ignored.
- Required: false
- Type: String
- Default: none
-
itemKey
- The item key
- Required: false
- Type: String
- Default: none
-
projectKey
- The Project key
- Required: false
- Type: String
- Default: none
-
scope
- The scope of the @var attribute. Valid values are
"page" and "request".
- Required: false
- Type: String
- Default: "request"
-
searchResult
- The SearchResultDocument object. If specified,
projectKey,
portalKey,
and harpUrl are ignored.
- Required: false
- Type: SearchResultDocument
- Default: none
-
var
- The name of the variable used to access the result.
- Required: true
- Type: String
- Default: none
Example Usage:
<#if params['projectKey']?? && params['itemKey']??> <@td.fileProperties var="itemData" projectKey="${params['projectKey']}" itemKey="${params['itemKey']}"/> </#if> <#if itemData??> <h1>${itemData.properties.specifiedDetails.title?html}</h1> <#else> <h1>No such file.</h1> </#if>