Table of contents Previous Next
Components
For the River Bend web site example, we will personalize an image in the homepage. This image will be changed automatically based on the season we are currently in. There will be two images, a winter image and a summer image. The example of the summer image showing on the homepage can be seen in the figure below.
Figure 22b Summer Drink showing personalization on homepage (327_3b1)
Using personalization rules, the content of the beverage of the current season will be selected and the image will be displayed.
In order for us to create the Personalization component, we need to do the following:
To create a personalization rule, write a select rule that retrieves all the content that has the category as Summer.
1.Navigate to the
Personalization Tab next to Web Content Management tab and then to Business Rules. Refer to Figure 23
Figure 23 Personalization tab (327_4)
2. Select
New and choose
Rule.
3. Enter
SummerDrinkRule in the Rule name
4. Choose
Select Action if it wasn't already selected
5. Click on
content* and change it to be
Web Content
6. Click on
Attribute and change it to be
Category
7. Choose
is exactly instead of
is associated with
8. Click on
value*, choose
Select category
9. Navigate to the category
Summer under
SeasonDrink under
Beverages under
Products
10. Click
Ok
The rule should look like the rule in Figure 24
Figure 24 Summer Selection Action Rule (327_5)
11. Click Save
12. Repeat steps 2 through 11 to create the Winter Selection Rule. Its name would be WinterDrinkRule and Category is Winter
Now, we will create the profiler rule that would set the present season according to the current month.
1. Select
New and choose
Rule.
2. Enter
SeasonsProfilerRule in the Rule name
3. Choose
Profiler
4. Click on
Profile* and type
Winter
5. Click
Submit
6. Click on
attribute* and change it to be
Date Month
7. Click on
is and make it
is between
8. Add
January in the first value and
March the second value
9. Click on
add Condition and repeat steps 6-8 with the values
October and
December
10. Click on
add Profile and type
Summer
11. Repeat steps 6-8 with values
April and
September
12. Click
Save
Now, we will create the binding rule that binds together the action rules with the profiler rule. The binding rule runs first the profiler rule, and according to the profile selected, it will fire the action selector rule.
1. Select
New and choose
Rule.
2. Enter
SeasonsBindingRule in the Rule name
3. Choose
Binding
4. Click on
Profiler*
5. Click on
Select Profiler and choose
SeasonsProfilerRule
6. Click
Ok
7. Click on
Profile and choose
Winter
8. Click on
DoAction and choose
SummerDrinkRule
9. Click on
Profile and choose
Summer
10. Click on
DoAction and choose
WinterDrinkRule
11. Click
Save
Refer to Figure 25 for the Binding Rule
Figure 25 Binding Rule (327_6)
If we had already created the content with the matching categories, we can view the content as shown in Figure 26 by clicking on Preview
Figure 26 Binding Rule Viewer (327_7)
A no content screen will be shown until we create content with those categories.
To display the result that was filtered based on the season, we create a personalization component. The personalization component is very similar to the menu component. We choose the starting point of our rules, in our case it is the
SeasonsBindingRule and we decide upon the display of the result.
For out example, we will be showing the image of the content in the home page.
Follow those steps, to create the personalization component
:
1. Navigate back to
Web Content Management tab
2. Click
New and choose
Component Personalization.
3. In the
name field enter
Pers-Seasons
4. In the
Personalization Element section, click on
Search
5. Choose
SeasonsBindingRule
6. Click
Ok
Note: You can create a new rule by clicking on the
New* button if it is just one simple rule.
7. Add the following html in the
design for each search result:
8. Click
Save and then click
Save and Close.
We will be adding a reference to the personalization component from inside the presentation template of the home page.