structure:pageAsDigitalAssetUrl

This method calls an page and stores it as an digitalAsset - that way one can avoid having to serve javascript-files and css-files through InfoGlue. Not suitable for use if you have very dynamic css:es or scripts which includes logic depending on user info etc.. mostly usable if you have a static css or controls it on the pageCache parameters..

Parameters

Name

Required

Default

Type

Description

id

true

 

String

The result is stored in this variable.

propertyName

false

 

Object/String

The property name the component used to bind the content by in which you wish to get the attribute value from.

useInheritance

false

true

boolean

Sets if the component should look for other articles on other components with the same propertyname, either on the same page or on pages above.

useRepositoryInheritance

false

true

boolean

Sets if the component should use the repository inheritance or not when looking up entities using inheritance.

useStructureInheritance

false

true

boolean

Sets if the component should use inherit properties from it’s parent site nodes.

siteNodeId

false

 

Object/String

If stated the siteNodeId will be used when creating the url instead of the page bound on the propertyName.

contentId

false

 

Object/String

If given the url will include the argument.

languageId

false

 

Object/String

If given the url will include the language as an argument – thereby overriding the current user language.

fileSuffix

False

 

Object/String

If given the created asset will get this file-suffix.

 

ID-result variable contains:
A string representing the url.

Examples

The following example gets an url to the page bound by the component property "CSS page", makes an internal call with the same headers as the user and stores the result as a digital asset which is then returned as a url to the template and we then reference it as usual.

 

<structure:pageAsDigitalAssetUrl id="cssUrl" propertyName="Css page" fileSuffix=”css”/><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
<TITLE>Cascading Style Sheets, level 1</TITLE>
<LINK rel="stylesheet" type="text/css" media="screen" href="<c:out value="${cssUrl}"/>">
</HEAD>
<BODY>
....
....
</BODY>
</HTML>



comments powered by Disqus