Configurations include two parts:
Page Flow HstSiteMapItemHandler ID (defaultpageflowcontrolhandler by default) must be configured in either mount level or sitemap item level. So, Page Flow Module can handle automatic initiation, redirection, etc. for a visitor based on the visitor’s Page Flow instance lifecycle.
Also, Page Flow Definition ID must be configured in a channel, mount or sitemap item level. So, Page Flow Module will initialize and manage a Page Flow instance based on the configured Page Flow Definition ID.
One ore more HstSiteMapItemHandlers can be configured in either mount level (@hst:defaultsitemapitemhandlerids property) or sitemap item level (@hst:sitemapitemhandlerids property).
It could be very convenient to configure the HstSiteMapItemHandler ID value in the mount level because the same HstSiteMapItemHandlers will be applied to all the resolved sitemap items under the same resolved mount. So, you don’t need to configure the HstSiteMapItemHandler ID for each sitemap item configuration again and again. This is extremely useful when you have a channel that serves a Page Flow Module driven request processing. e.g, “Identity Protection Product Campaign Microsite Channel”.
However, if you want to control it in more granular level by having some sitemap items for other page serving, and having some other sitemap items for Page Flow Module driven request processing, then you might want to configure the the HstSiteMapItemHandler ID value in each sitemap item level for some selected sitemap items. e.g, “/campaign1”, “/campaign1/any”, … In this case, make sure that you configured the Page Flow HstSiteMapItemHandler ID on all the possible sitemap items for Page Flow Module driven requests.
Suppose you have an HST Mount configuration at /hst:hst/hst:hosts/dev-localhost/localhost/hst:root/campaign1 which is associated with a channel called “Campaign 1”.
If you want the channel to be controlled by the Page Flow module, then simply add the registered HstSiteMapItemHandler name to the @hst:defaultsitemapitemhandlerids of the mount configuration like the following:
For example,
/campaign1: jcr:primaryType: hst:mount hst:defaultsitemapitemhandlerids: [defaultpageflowcontrolhandler] ...
Now, every request coming along to this mount will be controlled by Page Flow Module.
You can configure the @hst:sitemapitemhandlerids property on each sitemap item separately in this scenario. If you set the property on specific sitemap items, any requests onto the sitemap items will be controlled by Page Flow Module. Otherwise, Page Flow module wouldn’t do anything for the other sitemap items.
For example,
/payment: jcr:primaryType: hst:sitemapitem hst:sitemapitemhandlerids: [defaultpageflowcontrolhandler] ...
Once you published a Page Flow Definition document like shown in the Demo Project, you can associate the Page Flow Definition ID value (the Flow ID field value in the editor) to a channel, a mount or a sitemap item.
The default PageFlowControl implementation (org.onehippo.forge.pageflow.hst.sitemapitemhandler.DefaultHstPageFlowControl) resolves the current Page Flow Definition ID in the following order:
When you configure a Page Flow Definition for a dedicated channel, you might also want to configure the Page Flow Definition through the Channel Setting window like the following:
So, you can simply copy Flow ID field value in the Page Flow Definition document and paste it into the Default Page Flow ID input shown above.
Page Flow Module provides a default Channel Info: org.onehippo.forge.pageflow.hst.channel.PageFlowSiteInfo
To use this Channel Info, you can configure your channel configuration like the following:
/hst:channel: jcr:primaryType: hst:channel hst:channelinfoclass: org.onehippo.forge.pageflow.hst.channel.PageFlowSiteInfo ...