I am trying to modify share-config-custom.xml so that I can search emails by the following properties:
<!-- cm:emailed aspect -->
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
This is my 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>
And it doesn't work. I have tried aspect
, node-type
instead of model-type
. I used many combination of force="true"
, for-mode="view"
... still couldn't get it work. In the search form I can't see anything related to the properties. It's just a default search form. Any help will be appreciated.
up: To be clear, the problem is that I have some documents with cm:emailed aspect. I want to create a form for only searching such documents. However, when I say "<form labelId="Mails" descriptionId="Search for Mails">cm:content</form>
" the default content search form also modified. I believe that there must be some easy way or ways. I don't want to define a new type in my custom model, I leave this solution for the last.