In this example information for employees
based on the state they live in will be displayed. To create personalized
content to display state-based information for an employee:
1. Enable
content profiling.
2. Create
a Taxonomy to store categories for each state code.
3. Create
a new presentation template for the state-based pages.
4. Create
a new authoring template for the state-based content.
5. Create
a new template map.
6. Create
content for each state's details.
7. Create
a personalization component.
8. Reference
the personalization component in a presentation template.
To enable content profiling:
1. Edit
the
WCMConfigService.properties
file located in the
was_profile_root/PortalServer/wcm/config/
directory on the server.
2. Ensure
that the content control setting includes the "com.aptrix.pluto.taxonomy.ProfileControl"
setting:
control.Content=com.aptrix.pluto.workflow.WorkflowControl,com.aptrix.pluto.taxonomy.ProfileControl
3. Restart
the authoring server.
Create a Taxonomy in the DesignLibrary to store categories for each state
code:
1. Clicks
New > Taxonomy.
2. For
the
Name type SateCodes and click
Save and close.
3. Click
New > Category.
4. For
the
Name enter a state code. For example, for North Carolina create
a category named "NC". These codes must be
the same as the state codes used in the
stateOrProvinceName
field in the HR systems LDAP.
5. Click
Save and close.
6. Repeat
this for each state.
Create a presentation template in the DesignLibrary named State-PT:
1. She clicks
New > Presentation Template .
2. For the template name,
type State-PT.
3. Create
a simple HTML table in the presentation template by adding the following
code into the presentation template section.
|
|
|
- Save and close the presentation template.
Create an authoring template
- Create an authoring template named State-AT
in the DesignLibrary.
- Click Default Content Settings .
- Click Manage Elements.
- Add a text element named body to
the authoring template.
- Go to the workflow section and select
the ApprovalWorkflow from the DesignLibrary.
- Save and close the authoring template.
Map the authoring and presentation templates to each other:
- 1. Go
back to the site framework view in the ContentLibrary.
- Go to Site Areas -> Site -> MainSite
- Open MainSiteArea.
- Edit the template map and link State-PT
and State-AT from the DesignLibrary.
- Save and close the site area.
Reference the body element in your presentation template
- Go back to the presentation template
view in the DesignLibrary and open State-PT.
- Enter the following element tag into one
of the table cells of the presentation template.
The content of the element tag will change
depending on which content item is displayed.
- Save and close the presentation template.
Create a content item named State-NC in the ContentLibrary:
1. Click
New >Content.
2. Selects
State-AT as the authoring template.
3. For
the name, type
State-NC.
4. Select
NC as the category in the profiling section.
5. Type
some text in the
body element.
6. Click
Save and Close.
7. Select
MainSiteArea as the site area to save the content under.
8. As
a workflow is being used, this is initially saved as a draft. Go to the
"My Drafts" view and select
State-NC and then click
Next
Stage until it moves to the
PublishStage.
9. Repeat
these steps for each state.
Create a personalization component in the DesignLibrary that will display
a link to State-based content based on the location of the current user:
1. Click
New > Component > Personalization
2. Name
the component
Current-State.
3. Click
New under the
Personalization element section.
4. The
Personalization Picker opens. Create the following query:
- Select Web content
- Whose location is Content Library
- Whose authoring template is State-AT
- Whose category is exactly current
Portal Users.stateOrProvinceName
- Click Save.
- Add a placeholder in Design
for each menu search resultNavigator result design 1
to display links in the navigator:
- Click Save and close .
Add a reference to the new personalization component in the State-PT presentation
template:
1. Go
back to the
presentation template view in the
DesignLibrary and
open
State-PT in edit mode
.
2. Enter
the following element tag into one of the table cells of the presentation
template:
3. Click
Save and close.
Next step: WCM
6.1-B: 6.0 Enabling syndication and using the system
Parent topic: WCM
6.1-B: 5.0 Setting up the Authoring system