Two advanced search forms for one type?

cancel
Showing results for 
Search instead for 
Did you mean: 
deny7
Active Member

Two advanced search forms for one type?

Is it possible to define two different advanced search forms for one type? Like this:

<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!-- Forms for the advanced search type list -->
<forms>
<form labelId="one form"
descriptionId="search.form.desc.cm_folder">ex:document</form>
<form labelId="two form"
descriptionId="search.form.desc.cm_folder">ex:document</form> 
</forms>
</advanced-search>
</config>

I know it doesnt sound very logic, but they will differ in number of field visible on form. I tried to define for one form custom type and give that type parent of ex:document, like this:

<type name="ex:establishment">
   <parent>ex:document</parent>
</type>

but this doesnt work, when I search, It gives me 0 results, It looks like the inherited properties doesnt get indexed for that type.

1 Reply
roberto_gamiz
Established Member II

Re: Two advanced search forms for one type?

You could define a custom avanced search form for the type "ex:establishment" and another for "ex:document".

The first one search for elements of type "ex:establishment" and his descendants and the second one for elements of type "ex:document" and descendants including "ex:establishment".

So if "ex:document" have no other sons and there aren't contents of this type both forms have to search on the same group of nodes.