There are certain guidelines that should be followed when referencing different types of policies in XDIME markup.
When policies are referenced in XDIME markup elements, the policy name must be preceded by a forward slash and must be followed by the policy file type extension. The following table shows examples of how to reference the Multi-Channel Server policies that can be created with Mobile Portal Toolkit.
Policy Type | Example |
---|---|
Audio Component |
where my-audio is
the audio component policy name. |
Layout and Theme |
where standard-layout is
the layout policy name and standard-theme is the
theme policy name. |
Image Component |
where stars is
the image component policy name |
Text Component |
where my-text is
the text component policy name. |
Rollover Image Component |
where my-rollover-image is
the rollover image component policy name. |
Chart Component |
where my-chart is
the chart component policy name. |
Link Component |
where my_link is
the link component policy name. |
Script Component |
where my-script is
the script component policy name. |
The following table shows the complete list of policy file extensions.
Policy Type | File Extension |
---|---|
Asset Groups | .mgrp |
Audio Components | .mauc |
Chart Components | .mcht |
Image Components | .mimg |
Link Components | .mlnk |
Rollover Image Components | .mrlv |
Script Components | .mscr |
Text Components | .mtxt |
Layouts | .mlyt |
Themes | .mthm |
Devices | .mdpr |
If a portlet references a policy in its project, then it can reference the policies using the style shown in the previous table. A policy is in the portlet's project if the policy file is in the mcs-policies directory of the portlet's WAR directory. The XDIME aggregator code can also reference policies in its project (the default project) in the same way.
<canvas layoutName="mcsi:policy('<user-friendly-project-name>', '/standard-layout.mlyt')" type="portlet">
where <user-friendly-project-name>
is the user friendly project name for the global policy project and
standard-layout is a layout policy in that project. <canvas layoutName="mcsi:policy('default', '/aggregator-layout.mlyt')" type="portlet">
where aggregator-layout is
a layout policy in the default (aggregator) project.