Alfresco共享定制,用于高级搜索
我正在尝试修改share-config-custom.xml,以便可以通过以下属性搜索电子邮件:Alfresco共享定制,用于高级搜索,alfresco,alfresco-share,advanced-search,Alfresco,Alfresco Share,Advanced Search,我正在尝试修改share-config-custom.xml,以便可以通过以下属性搜索电子邮件: <!-- cm:emailed aspect --> <show id="cm:originator" /> <show id="cm:addressee" /> <show id="cm:addressees" /> <show id=
<!-- cm:emailed aspect -->
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
这是我的share-config-custom.xml:
<config evaluator="model-type" condition="cm:content">
<forms>
<form label="Mails">
<field-visibility>
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
</field-visibility>
</form>
</forms>
</config>
<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!-- Forms for the advanced search type list -->
<forms>
<!--
The 'form' config element contains the name of the model type
of the form to display.
The element supports the following optional attributes:
id = form id, the id of "search" will be assumed if not set
label = label text to display - defaults to model type if not set
labelId = I18N message id of label text to display
description = description text to display
descriptionId = I18N message id of description text to display
-->
<form labelId="Mails" descriptionId="Search for Mails">cm:content</form>
</forms>
</advanced-search>
cm:内容
但它不起作用。我尝试了方面
,节点类型
,而不是模型类型
。我对mode=“view”使用了许多组合force=“true”
,。。。还是无法让它工作。在搜索表单中,我看不到任何与属性相关的内容。这只是一个默认的搜索表单。任何帮助都将不胜感激
up:说清楚,问题是我有一些cm:emailed方面的文档。我想创建一个表单,仅用于搜索此类文档。但是,当我说“cm:content
”时,默认的内容搜索表单也被修改了。我相信一定有一些简单的方法。我不想在自定义模型中定义新类型,我将此解决方案留到最后。共享配置不正确。看看
您需要使用方面字段更改cm:contentform id=“search”
的模型类型
我在打电话,所以答案可能很短
--更新--
您不能在高级搜索的下拉列表中选择方面,Alfresco的当前实现不允许这样做
在大多数情况下,我只是将方面字段添加到默认的cm:content类型中
或者,当我对应用方面有更多控制时,我只需创建一个新类型custom:mailed,并将父项cm:content作为强制方面cm:mailed。然后,您可以创建一个行为,将该类型专门化为自定义:已发送,或者在Alfresco中创建一个入站规则,该规则在hasAspectcm:emailed上触发
我希望这能澄清一点。您不能在搜索配置中选择方面,因此,是的,查看方面的唯一方法是将它们添加到默认的cm:content中,如我所说,并将再次这样做:不,无法选择方面。所以没有简单的方法。最简单的方法是像我建议的那样创建一个类型。困难的方法是定义您自己的自定义高级搜索配置,覆盖默认配置,并对其执行任何您想要的操作。