Copy Content into a Shared Library
Your site's private content library was created when your site was created. If you want to use this content with multiple sites, you must copy it into a shared library.
These instructions use the SiteGenesis application data as an example.
- Select Administration > Site Development > Site Import & Export.
- In the Export section, enter the archive name: sg_export.
-
In the Data Units To Export section, select:
- Sites > SiteGenesis > Content
- Library Static Resources > SiteGenesis
- Click Export.
-
Watch the status in the Status section. When the export
completes, save the resulting file
sg_export.zip
to the desktop.- In the Status section, click the export file's process link.
- Scroll down and click the export file's name link.
- Save the file to your local system.
-
Within your .zip file editor, extract the files
You see a content file directory structure.
-
Create the library content .zip file.
-
Within the
sg_export
directory, create a new directory called libraries. -
Within this directory, create a subdirectory to contain
the shared library that you create during the process. Name the directory
SharedLibrary
(for this example). -
Within the
sg_export\sites\SiteGenesis\library
directory, copy thestatic
subdirectory and thelibrary.xml
file to the newsg_export\libraries\SharedLibrary
folder you created previously. -
Edit the file
sg_export\libraries\SharedLibrary\library.xml.
-
Add an attribute,
library-id="SharedLibrary"
to the top level<library>
element as follows:<library main... library-id="SharedLibrary">
- Save the file.
- Delete the sites directory because it's no longer necessary.
-
Rename the top-level directory from
sg_export
toSharedLibrary.
-
Zip the top-level directory to create a
SharedLibrary.zip.
-
Within the
-
Select Administration > Site Development >
Site Import & Export. Upload this file and then import it on
the same page.
This creates your shared library containing all the same content as the SiteGenesis application.
-
Ensure that your database content was imported and your static
content copied:
-
Select Administration > Sites > Content
Libraries.
You can see a shared library with the same number of assets and folders as the original SiteGenesis library
- Select siteGenesis > Content > Import & Export > Manage Content Images.
-
Select the SiteGenesis private library.
You can see the top level of the file system for the SiteGenesis private library.
-
To expand the tree, click the expansion icon +.
You can see the entire content file set.
-
Return to the Content Images page and select the
SharedLibrary.
You can see the same file set as in the private library.
-
Select Administration > Sites > Content
Libraries.
Infocenter Retirement: On June 30, 2023, the Infocenter was retired, and documentation currently hosted on the Infocenter will be published to Salesforce Help, Commerce Cloud Developer Center, and Salesforce B2C Commerce Developer Documentation Resources. For more information, see the release note.