0

I want to add a csv response template to the default slingshot/search? web script which is inside in a jar (Alfresco remote api).

Already l have an ant script which build a jar inside Alfresco/tomcat/shared/lib

Inside this jar l have define an extension xml file config/alfresco/site-data/extensions/extension-modules.xml

<extension>
    <modules>
        <module>
            <id>Custom DocumentList Widget</id>
            <description>Extend Alfresco Search</description>
            <customizations>
                <customization>
                    <targetPackageRoot>org.alfresco.slingshot.search
                    </targetPackageRoot>
                    <sourcePackageRoot>webscripts.search</sourcePackageRoot>
                </customization>
            </customizations>
        </module>
    </modules>
</extension>

Also lnside config/webscripts/search l have the search.get.csv.ftl file but I never get the csv response. Is this the best way to modify/extend the default web script ?

mr antoni
  • 595
  • 1
  • 6
  • 17

1 Answers1

2

No this isn't the best way to extend this in your case. Normally it is, but in your case just use the default override mechanism of Alfresco.

So just place your addition in org/alfresco/slingshot/search, cause Alfresco doesn't has a csv.ftl file, so it will be available.

The extension module is uses to extend/change the default get.js & get.html.ftl file, so I'm not sure if it will accept any addition if you don't specify the one of the above files.

Tahir Malik
  • 6,623
  • 15
  • 22