Document Designer - instructions > Designing page layouts > Adding objects > Accessing resources stored in the runtime repository

Accessing resources stored in the runtime repository
Resources (images, fragments, etc.) can be stored in the runtime repository via Resource output connectors or filters. See Resource output connector in the Connectors documentation or Resource filter in the Design Center documentation for information about how to store the resources. In StoryTeller you can use the URI prefix resource: to access this type of resources.
Since the runtime repository is only available at runtime, you must create a default StoryTeller object (image, fragment, etc.), and then use a script before the StoryTeller object or a property Modification to substitute the default object with the appropriate runtime resource.
URI syntax
A runtime resource can be accessed by referencing the GUID or name of the resource. The following types of URIs can be used:
Examples
Example 28
In this example, a document includes a default image as logo. Two alternative logos are stored as resources in the runtime repository, and these resources are named logoEN and logoGE. To access the appropriate logo image at runtime, the following script is added before the default logo image:
If($country = "GE")
{
stSetProperty( "ImageURI", "resource:/?name=logoGE");
}
else
{
stSetProperty( "ImageURI", "resource:/?name=logoEN");
}
 
Example 29
In this example, a document includes a default image as logo. Two alternative logos are stored as resources in the runtime repository, and these resources are named logoEN and logoGE. The following Before Process script determines which logo to use when:
If($country = "GE")
{
$logoResource = "logoGE";
}
else
{
$logoResource = "logoEN";
}
To access the appropriate logo image at runtime, the following Modification is defined for the Image URI property of the default logo image:
concat('resource:/?name=', $logoResource)
 
OpenText StreamServe 5.6.2 Updated: 2018-01-26