Add metadata bound fields in the Search ASP pages

This topic will describe how you can add metadatabound fields to the search Classic ASP pages of Content Manager 's web client.

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 <header> 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. On the <form> in search.aps add the "data-metadatabinding-view" attribute.
    <form method="POST" action="DocumentMsg.asp" target="DocumentMsg" data-metadatabinding-view='{ }'>