This article covers a Bloomreach Experience Manager version 11. There's an updated version available that covers our most recent release.

Binaries that need workflow

If you want workflow on a binary, such as a pdf, you must use embedded resources. An embedded resource is a resource inside a document. Through the workflow of the document, the binary it contains has also workflow. Thus, do not store such a resource in an asset folder: Namely, assets are directly publicly available: In other words, they are live instantly.

Use embedded resources in a document if you need workflow on the resource

how to:

Step 1

In the cms template editor, go to some document type (for example 'news article') and, select from the Compound Field the field Resource. Rename the Caption to, say, 'My Asset' and the path to 'asset'. Save the changes and 'commit' the changes. Now, you can add an embedded resource to a news article in the cms

Step 2

In the HST, adjust the bean that reflects the document type you changed above. Add a getter for the embedded resource. Thus, something like:

public HippoResourceBean getAsset() {
  return getBean("my_namespace:asset");
}

Step 3

Adjust one of your jsp's or freemarker templates to add a download link for the asset that is available on the news bean now. For example something like:

 <hst:link var="assetLink" hippobean="${newsDoc.asset}"/>
 <a href="${assetLink}">Download</a> : ${newsDoc.asset.lengthMB} MB. Type = ${newsDoc.asset.mimeType}
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?