Shared assets provide a convenient way to apply consistent content such as headers, footers, product grids, and promotion banners across multiple templates by reusing snippets of code. 

To keep your email code clean, you can reuse the code in a shared asset in other shared assets. This is referred to as nesting. The shared asset that is used in another shared asset is called a ‘nested shared asset’.

Note

Contact support@blueshift.com to enable this feature for your account.

Consider the following points when nesting shared assets:

  • You can only use a shared asset of the same type inside another shared asset. For example, a shared asset template of type HTML can include another shared asset template of type HTML only.
  • You can nest shared assets up to 1 level. For example,
    • Shared asset A does not reference any other assets. Shared asset B references shared asset A. Hence the nesting depth is 1 (B ←A), which is acceptable.
    • If we have shared asset C, it cannot reference shared asset B as the depth would become 2. (C← B ← A).
    • However, shared asset C can reference shared asset A (C ←A). In other words, it is possible to reference a shared asset in multiple shared assets.
  • The Templates using this asset section of the shared asset displays all the other shared assets that include this shared asset along with email templates that use the shared asset.

Example: Shared asset A does not reference any other assets. Share asset B references shared asset A. Hence the depth is 1 (B ← A).

Shared Asset A

shared_nested_A.png

Shared Asset B

shared_nested_B.png

Syntax for nested shared assets

The syntax for nesting a shared asset in another shared asset depends on where the nested asset will be used.

Consider shared asset A which does not reference any other assets. Share asset B references shared asset A. When you include Shared asset A in Shared asset B, use the following syntax:

  • If shared asset B is to be used in a Visual Editor email template, use [shared_asset]bsft_Demo_asset_A[/shared_asset].


    shared_nested_visualeditor.png

  • If shared asset B is to be used in an HTML Editor email template, use <shared_asset>bsft_Demo_asset_A</shared_asset>.


    shared_nested_htmleditor.png

Lock nested assets

  • When you lock an asset that contains nested assets, the nested assets are also locked. For example, if shared asset B uses shared asset A (i.e. asset A nested under asset B), locking shared asset B will also lock shared asset A.
  • Similarly, when you unlock a parent asset, all child assets are unlocked. If both assets B and A are locked, then unlocking asset A will also unlock asset B.

shared_lockasset.png

Delete an asset

  • Use the Remove option on the shared asset listing page to delete a shared asset. 
  • A shared asset cannot be deleted if it is being referenced in any templates or shared assets.

shared_remove.png

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.