Creating substitution parameters for image paths in CKEditor content
If your site uses CKEditor, you can create a substitution parameter to represent the variable part of an image path. When business users enter HTML content in CKEditor, they can use the substitution parameter in the image path.
This example shows a hardcoded path to an image file:
- src=/wcsstore/Aurora/images/dress.jpg
This example shows the same path, but with a substitution
parameter [imagePath]
to represent the variable part
of the image path:
src=[imagePath]images/dress.jpg
There are two main reasons for creating this type of substitution parameter:
Reason | Explanation |
---|---|
1. Your site is already using the [imagePath] substitution
parameter for marketing content. |
In Feature Pack 6, a similar [imagePath] substitution
parameter was introduced for marketing content. If your store already
contains marketing content that uses the [imagePath] substitution
parameter, CKEditor will support this substitution parameter after
you complete the steps in this topic. For more information about the
Feature Pack 6 [imagePath] substitution parameter,
see Substitution variables for entering HTML in Management Center. |
2. You have an extended site, and you want to facilitate sharing HTML content that is created in the asset store. | By creating this type of substitution parameter,
a single piece of marketing content can be used for multiple stores
with different images. Here is an example of this scenario:
In this case, when creating the HTML content in the asset
store, the business user can use the substitution parameter in the
path to the image in each extended site store, for example: Then,
when the HTML content is rendered for each extended site store, the For example:
Will be:
|
This type of substitution parameter can be used in any rich text field that supports CKEditor in any Management Center tool.