AnsweredAssumed Answered

How Configure Advanced Search?

Question asked by mnavarro on May 31, 2016
Latest reply on May 31, 2016 by steven.okennedy
Hi, i am working with Alfresco Community 5.0 Share. I'm triying configure advanced search, where i want search for properties of a custom type. I modify share-config-custom.xml with the next  code, but i dont see my custom forms on Alfresco.Can anybody help me? The code is next.



<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
    <advanced-search>
        <!– Forms for the advanced search type list –>
        <forms>
            <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>           
            <form labelId="type.pr_ejemplo" descriptionId="search.form.desc.pr_ejemplor">pr:ejemplo</form>
        </forms>
    </advanced-search>
</config>




<!– pr:ejemplo type–>
<config evaluator="model-type" condition="pr:ejemplo">
    <forms>
        <!– Search form –>
        <form id="search">
            <field-visibility>
                <show id="cm:name" />
                <show id="cm:title" force="true" />
                <show id="cm:description" force="true" />
                <show id="mimetype" />
                <show id="cm:modified" />
                <show id="cm:modifier" />
                <!– pr:ejemplo–>
                <show id="pr:nombre" /> <!– property of type pr:ejemplo –>

            </field-visibility>
            <appearance>
                <field id="mimetype">
                    <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
                </field>
                <field id="cm:modifier">
                    <control>
                        <control-param name="forceEditable">true</control-param>
                    </control>
                </field>
                <field id="cm:modified">
                    <control template="/org/alfresco/components/form/controls/daterange.ftl" />
                </field>
                <!– sc:productRelated –>
                <field id="pr:nombre" label-id="prop.sc_product">
                    <control template="/org/alfresco/components/form/controls/textfield.ftl" />
                </field>        
            </appearance>
        </form>
    </forms>
</config>

Outcomes