Documentation Center

Add metadata bound fields in the main Search page

The Search page for all objects except publications requires specific settings.

Procedure

  1. Add the field(s) to SearchNewGeneral.xml (\Infoshare\Web\Author\ASP\XSL) like with any other field you want to add to the Search.
  2. In addition you need to add the data-metadatabinding-property attribute to indicate the name and level of the field the binding needs to be applied on. These should match with the regular name and level attributes.
    <ishfield name="FTESTCITIES" label="Cities" level="logical" sort="no" info="Cities" showoperator="no" operator="contains" datatype="text" data-metadatabinding-property='{ "fieldLevel": "Logical", "fieldName": "FTESTCITIES" }'/>
  3. In the <head> of search.asp (\Infoshare\Web\Author\ASP) add the .js scripts that will allow to find the values of the added fields.
    
    <script type="text/javascript" src="Scripts/MetadataBinding/MetadataBindingFormRenderer.js"></script>
    <script type="text/javascript">
        // Apply binding after the document is ready
        $(function () {
            Trisoft.MetadataBinding.FormRenderer.applyBindings("", function () {
                // Do your custom stuff here
            });
        });
    </script>
  4. In the <form> element for search.asp add the data-metadatabinding-view attribute.
    <form method="POST" action="DocumentMsg.asp" target="DocumentMsg" data-metadatabinding-view='{ }'>