ShowTable of Contents
Within WCM, content can be categorized. Normally, this is used to allow WCM menus to display content related to specific categories. However, it is also possible for users within WCM to have categories associated with their profile. This can be done within theWCM Authoring UI
, the user can select their own categories using a Taxonomy Element
, or can be done programmatically
. Once the user is associated with categories, a WCM menu can then retrieve content that is associated with the same categories as the user.
In this example, we will show how these categories can be used within PZN rules to retrieve the content that is related to the categories that the user is interested in.
Creating and Deploying the Custom Application Object
There are 2 approaches that we can use for this application object. One is to retrieve the values that WCM has associated with the user. This is useful if the end user has categories stored within WCM, the dynamic mapper approach is being used (categories added to WCM Users programmatically), or the end user is selecting their own categories using the taxonomy tree. The other approach is that the custom application object can associate categories for the specific user programmatically. This approach is useful, because categories can selected based on things like user cookies, request attributes in the current request, etc. This particular example will retrieve the categories directly from WCM for the user.
Creating the WCM Component
In order to retrieve the categories for the current user, the application object will basically have to "render"
Create the Custom Application Object
Install the Custom Application Object Code
Create the Application Object within PZN UI
Creating the PZN rules
Rendering the Results