作为专家用户,您可以在资源管理器树中添加文件夹并对其进行自定义。
在本节](…/…/platform/using/adobe-campaign-explorer.md#about-navigation-hierarchy)中,进一步了解活动资源管理器和导航层次结构[。
导航列表使用的文件夹类型在遵循xtk:navtree模式语法的XML文档中进行描述。
XML文档的结构如下:
<navtree name="name" namespace="name_space">
<!-- Global commands -->
<commands>
...
</commands>
<!-- Structured space for adding a folder -->
<model name="<name>" label="<Label>">
<!-- Folder type -->
<nodeModel>
...
</nodeModel>
<model name="<name>" label="<Sub model>">
...
</model>
</model>
</navtree>
XML文档包含具有name和命名空间属性的<navtree>
根元素,用于指定文档名和命名空间。 名称和命名空间构成文档标识键。
应用程序的全局命令在文档中从<commands>
元素声明。
在文档中,文件类型声明采用以下元素构建:<model>
和<nodemodel>
。
全局命令允许您启动操作。 此操作可以是输入表单或SOAP调用。
可从主Tools菜单访问全局命令。
命令配置结构如下所示:
<commands>
<!-- Description of a command -->
<command name="<name>" label="<label>" desc="<Description>" form="<form>" rights="<rights>">
<soapCall name="<name>" service="<schema>">
<param type="<type>" exprIn="<xpath>"/>
...
</soapCall>
<enter>
...
</enter>
</command>
<!-- Separator -->
<command label="-" name="<name>"/>
<!-- Command structure -->
<command name="<name>" label="<Label>">
<command...
</command>
</commands>
全局命令的描述输入在<command>
元素中,并具有以下属性:
<command>
元素可包含<command>
子元素。 在这种情况下,父元素允许您显示由这些子元素组成的子菜单。
命令的显示顺序与在XML文档中声明的顺序相同。
使用命令分隔符可以在命令之间显示分隔条。 它由命令标签中包含的'-'值标识。
<soapcall>
标记及其输入参数的可选存在定义要执行的SOAP方法的调用。 有关SOAP API的详细信息,请参阅活动 JSAPI文档。
在从<enter>
标记进行初始化时,可以更新表单上下文。 有关此标签的更多信息,请参阅有关输入表单的文档。
示例:
启动“xtk:import”表单的全局命令声明:
<command desc="Start the data import wizard" form="xtk:import" label="&Data import..." name="import" rights="import,recipientImport"/>
在命令标签中存在&,在“I”字符上声明键盘快捷键。
带分隔符的子菜单示例:
<command label="Administration" name="admin">
<command name="cmd1" label="Example 1" form="cus:example1"/>
<command name="sep" label="-"/>
<command name="cmd1" label="Example 2" form="cus:example2">
<enter>
<set xpath="@type" expr="1"/>
</enter>
</command>
</command>
执行SOAP方法:
<command name="cmd3" label="Example 3" promptLabel="Do you really want to execute the command?">
<soapCall name="Execute" service="xtk:sql"/>
</command>
通过文件夹类型,您可以访问模式的数据。 与文件夹关联的视图由列表和输入表单组成。
文件夹类型配置结构如下所示:
<!-- Structured location to add the folder -->
<model name="name" label="Labelled">
<!-- Type of folder -->
<nodeModel name="<name>" label="<Labelled>" img="<image>">
<view name="<name>" schema="<schema>" type="<listdet|list|form|editForm>">
<columns>
<node xpath="<field1>"/>
...
</columns>
</view>
</nodeModel>
<model name="<name>" label="<Sous modèle>">
...
</model>
</model>
必须在<model>
元素下输入文件夹类型声明。 此元素允许您定义从Add new folder菜单中可见的分层组织。 <model>
元素必须包含<nodemodel>
元素和其他<model>
元素。
name和label属性填充元素的内部名称和显示在Add new folder菜单中的标签。
<nodemodel>
元素包含文件夹类型的说明,其属性如下:
<nodemodel>
模型上的快捷键(用逗号分隔)。<nodemodel>
元素下的<view>
元素包含与列表关联的视图的配置。 列表的模式输入到<view>
元素的模式属性中。
要编辑列表的记录,将隐式使用与列表模式同名的输入表单。 <view>
元素上的type属性影响表单的显示。 可能的值有:
通过在**<view>
元素中输入form**属性,可以重载输入表单的名称。
通过<columns>
元素输入列表列的默认配置。 在<node>
元素上声明一列,该元素包含xpath属性,且该字段在其模式中被引用为其值。
示例:在“nms:收件人”模式上声明文件夹类型。
<model label="Profiles and targets" name="nmsProfiles">
<nodeModel deleteRight="folderDelete" editRight="folderEdit" folderLink="folder"
img="nms:folder.png" insertRight="folderInsert" label="Recipients"
name="nmsFolder">
<view name="listdet" schema="nms:recipient" type="listdet">
<columns>
<node xpath="@firstName"/>
<node xpath="@lastName"/>
<node xpath="@email"/>
<node xpath="@account"/>
</columns>
</view>
</nodeModel>
<nodeModel name="nmsGroup" label="Groups"...
</model>
相应的文件夹插入菜单:
加载列表时,可以应用过滤和排序:
<view name="listdet" schema="nms:recipient" type="listdet">
<columns>
...
</columns>
<orderBy>
<node expr="@lastName" desc="true"/>
</orderBy>
<sysFilter>
<condition expr="@type = 1"/>
</sysFilter>
</view>
快捷命令可让您在选择列表时启动操作。 操作可以是输入表单或SOAP调用。
可从列表的Action菜单或相关菜单按钮访问命令。
命令配置结构如下所示:
<nodeModel...
...
<command name="<name>" label="<label>" desc="<Description>" form="<form>" rights="<rights>">
<soapCall name="<name>" service="<schema>">
<param type="<type>" exprIn="<xpath>"/>
...
</soapCall>
<enter>
...
</enter>
</command>
</nodeModel>
在<command>
元素上输入命令的说明,其属性如下:
<command>
元素可包含<command>
子元素。 在这种情况下,父元素允许您显示由这些子元素组成的子菜单。
命令的显示顺序与在XML文档中声明的顺序相同。
使用命令分隔符可以在命令之间显示分隔条。 它由命令标签中包含的'-'值标识。
<soapcall>
标记及其输入参数的可选存在定义要执行的SOAP方法的调用。 有关SOAP API的更多信息,请参阅活动 JSAPI文档。
可以通过<enter>
标记在初始化时更新表单上下文。 有关此标签的更多信息,请参阅输入表单文档。
示例:
<command desc="Cancel execution of the job" enabledIf="EV(@status, 'running')"
img="nms:difstop.bmp" label="Cancel..." name="cancelJob"
promptLabel="Do you really want to cancel this job?" refreshView="true">
<soapCall name="Cancel" service="xtk:jobInterface"/>
</command>
<command label="-" name="sep1"/>
<command desc="Execute selected template" form="cus:form" lmonoSelection="true" name="executeModel"
rights="import,export,aggregate">
<enter>
<set expr="0" xpath="@status"/>
</enter>
</command>
有两种类型的文件夹管理操作:
对于链接的文件夹,必须填充<nodemodel>
元素上的folderLink属性。 此属性包含在数据模式中配置的文件夹上的链接名称。
数据模式中链接文件夹声明的示例:
<element default="DefaultFolder('nmsFolder', [@_folder-id])" label="Folder" name="folder" revDesc="Recipients in the folder" revIntegrity="define" revLabel="Recipients" target="xtk:folder" type="link"/>
在名为“folder”的文件夹链接上的<nodemodel>
配置如下:
<nodeModel deleteRight="folderDelete" editRight="folderEdit" folderLink="folder"
img="nms:folder.png" insertRight="folderInsert" label="Recipients" name="nmsFolder">
...
</nodeModel>