Content Asset APIs

You can use these Salesforce B2C Commerce APIs to customize your storefront application relative to libraries and content assets for both private and shared libraries.

B2C Commerce Script APIs

These APIs support both private and shared libraries.

Class Method
dw.content.ContentMgr

getSiteLibrary();

getContent(String id);

dw.content.Content

getOnlineFlag();

isOnline();

getSiteMapChangeFrequency();

getSiteMapPriority();

getSiteMapIncluded();

getSearchableFlag();

dw.web.URLUtils

URL staticURL(String context, String contextID, String relPath); - enables you to specify the ID of any shared library in B2C Commerce.

Note: It isn't possible to generate a URL that points to the private library of another site.
dw.io.File

File access to all libraries, folders, and content, for example:

LIBRARIES/[Library Name](/...)

B2C Commerce uses a fall-back mechanism to determine the site library path. It first checks to see if the token represents the ID of a site in B2C Commerce. If it does, it constructs a file path within the private library of that site. If the token isn't the ID of a site, then B2C Commerce interprets it as the ID of a shared library within B2C Commerce. You can use this mechanism to construct file paths for private and shared libraries (as long as there are no naming conflicts).

Pipelets

These pipelets support both private and shared libraries: GetContent, ImportContent, and ExportContent