Referencing a file resource
A file resource can be referenced within presentation templates and other element designs using either a component or element tag.
Creating a link to a file resource
To create a link to a file resource in a presentation template or element design to enable users to download the file reference, use the following tag structures.To create a link to a file resource component you use a component tag:<a href="<component name="FileResourceName"/>">Link Text</a>To create a link to a file resource element you use an element tag.
For example, to link to a file resource element in the current content item:
<a href="<element type="content" content="current" key="FileResourceName"/>">Link Text</a>
Rendering a file resource on a page
If your file resource is a file type that can be converted to HTML you can instead convert the file to HTML and render the converted HTML directly in your Web content using the format="HTML" parameter in a component or element tag.For example:
<component name="FileResourceName" format="HTML"?/><element type="content" content="current" key="FileResourceName" format="HTML"/>Examples of supported file types include:
- word processing documents (*.doc, *.odt)
- spreadsheets (*.xls) *
- HTML files (*.htm, *.html)
- Text files (*.txt)
Other file types may also work but test them first.
Parent topic:
Use a file resource element