cancel
Showing results for 
Search instead for 
Did you mean: 

Document Type created using Model Manager not visible in Adv. Search

hiten_rastogi1
Star Contributor
Star Contributor

Hi,

I was able to successfully create custom document type with properties using the Model Manager provided in 5.1, but when I tried to search the document using Adv. Search I was not able to find the document type in the dropdown.

Please help me out.

Thanks 

Hiten Rastogi

1 ACCEPTED ANSWER

ddraper
World-Class Innovator
World-Class Innovator

The types listed in the first drop-down (Content, Folder, etc) are hard-coded options. You would need to customize the advanced search page to add your option in.

You could craft a search query as follows in the main search page

* AND TYPE:"cm:folder"

(i.e. search for anything where the type is cm:folder).

...however if you want to have your available as an option in advanced search then you'll need to customize the page to include extra types in the drop-down menu. This is possible by configuring the forms for advanced search... in the share-config.xml you'll find a section that looks like this:

<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="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
         <form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
      </forms>
   </advanced-search>
</config>

You can add an additional "form" element for the type you want to include in the drop-down menu.

View answer in original post

1 REPLY 1

ddraper
World-Class Innovator
World-Class Innovator

The types listed in the first drop-down (Content, Folder, etc) are hard-coded options. You would need to customize the advanced search page to add your option in.

You could craft a search query as follows in the main search page

* AND TYPE:"cm:folder"

(i.e. search for anything where the type is cm:folder).

...however if you want to have your available as an option in advanced search then you'll need to customize the page to include extra types in the drop-down menu. This is possible by configuring the forms for advanced search... in the share-config.xml you'll find a section that looks like this:

<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="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
         <form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
      </forms>
   </advanced-search>
</config>

You can add an additional "form" element for the type you want to include in the drop-down menu.