cancel
Showing results for 
Search instead for 
Did you mean: 

How Configure Advanced Search?

mnavarro
Champ in-the-making
Champ in-the-making
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>

1 REPLY 1

steven_okennedy
Star Contributor
Star Contributor
Hi MNavarro,

Is the problem that your custom type does not appear at all in the drop down ("Look for:" I think its called on the screen)? Or is it that the option appears but the form doesn't load?

Where have you put the above code?  E,g,  what directory is your share-config-custom.xml in?  I'm assuming you have also configured and bootstrapped a model with a custom type called pr:ejemplo (type not aspect)? The configuration itself looks ok, so I would guess that the configuration itself is not getting picked up by the system

Regards

Steven