Hello,
I would like to customize Advanced Search to adding "My Search" option. I changed share-config-custom.xml (see below). But my customization doesn't work. I added a new item to search menu, but i get error "Form definition could not be found".
I use the definition from cm:folder, but it doesn't work. I use community edition 7.3 in Docker desktop.
Pls, do you see where is a problem?
Thanks, Martin
<config evaluator="model-type" condition="customContentModel"> <forms> <form> <field-visibility> <show id="cm:name" /> <show id="cm:title" force="true" /> <show id="cm:description" force="true" /> </field-visibility> <appearance> <field id="cm:name"> <control template="/org/alfresco/components/form/controls/textfield.ftl" > <control-param name="maxLength">255</control-param> </control> </field> <field id="cm:title"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> </appearance> </form> <!-- Search form --> <form id="search"> <field-visibility> <show id="cm:name" /> <show id="cm:title" force="true" /> <show id="cm:description" force="true" /> </field-visibility> </form> </forms> </config> <config evaluator="string-compare" condition="AdvancedSearch" replace="true"> <advanced-search> <forms> <!-- Standard out-of-the-box types --> <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> <!-- Custom type --> <form labelId="custom" label="My Search" descriptionId="customContent" description="My search description">customContentModel</form> </forms> </advanced-search> </config>
This may sound silly, but why your
customContentModel
doesn't have a prefix?
Hi,
I try to create new advanced search more than 10 day. I had a namespece prefix. If I use namespace prefix "myprefix:customContentModel" I get error "Namespace prefix myprefix is not mapped to a namespace URI".
Wow.... What does is mean? Where is defined namespace URI?
Thank you for your advice.
Martin
Hi mbikl,
The namespace prefix "myprefix:customContentModel" which you trying to add in your advsearch page custom form should be registered in your custom contentmodel also, then it'll not throwing this error.
Step1: create you custom content model with having myprefix + customContentModel to registered.
<namespaces>
<namespace uri="http://cms.testproject.com/model/content/1.0" prefix="myprefix"/>
</namespaces>
Step2: Restart your ACS to deploy that custom content model.
Step3: Use this custom namespace prefix in your advsearch form. It should work.
Thanks,
Simant
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.