Dynamic Component inclusions
To archive Dynamic Component Presentations, you need to define Dynamic Component inclusion rules. Dynamic Component inclusion rules are a specialized type of URI inclusion rule which supports replacement parameters in the resulting inclusion URLs. Dynamic Component inclusion rules are evaluated when a Dynamic Component is published. You define Dynamic Component inclusions on a per publication basis.
In Dynamic Web sites, you publish Dynamic Component Presentations (DCP) to the Content Data Store and write a filter in a Component Template or Page Template on the Content Manager to retrieve the content for a Web page. The Web page published from the Content Manager therefore does not necessarily contain any content; rather, its content is retrieved dynamically at runtime based on a query string.
A Dynamic Component inclusion rule contains a <Uri Value=""> element and an <Include Value=""> element:
<Publications BaseUrl="http://www.mywebsite.com:8080">
<Publication Id="1">
<InclusionRule Type="DynamicComponent" >
<Uri Value=""/>
<Include Value=""/>
</InclusionRule>
</Publication>
</Publications>
The <Uri Value=""> defines when the inclusion rule is triggered and can be one of the following:
- A Component TCM URI — the inclusion rule is triggered when the specific Component is published
- A Schema TCM URI — the inclusion rule is triggered when a Component based on the Schema is published
- A Component Template TCM URI — the inclusion rule is triggered when a Component Presentation that uses the Component Template is published
The <Include Value=""> defines a URL that is archived. The URL contains a query string (field-value pairs) for which you specify replacement tokens for the value parameters. When a match is made, the replacement tokens are substituted with the actual value when the match is made. You can specify the following replacement tokens (the values are the Content Manager (TCM) ID or URI)):
[COMPONENT ID]— the TCM ID of the published Component[COMPONENT URI]— the TCM URI of the published Component[SCHEMA ID]— the TCM ID of the Schema on which the published Component is based[SCHEMA URI]— the TCM URI of the Schema on which the published Component is based[TEMPLATE ID]— the TCM ID of the Component Template used in the published Component Presentation[TEMPLATE URI]— the TCM URI of the Component Template used in the published Component Presentation
The following is an example of a DynamicComponent inclusion:
<Publications BaseUrl="http://www.mywebsite.com:8080">
<Publication Id="1">
<InclusionRule Type="DynamicComponent" >
<Uri Value="tcm:4-131-16"/>
<Include Value="tcd/Website/index.jsp?component-id=[COMPONENT ID]&schemauri=[SCHEMA URI]"/>
</InclusionRule>
</Publication>
</Publications>