Accessing web resources from Freemarker
Managed by | Updated .
Background
External resources such as Javascript, CSS and image files are often required for Funnelback's search results.
These resources are normally stored within a CMS and referenced as external links from within the Funnelback search results template. However it is sometimes desirable to host some or all of the files on the Funnelback server.
This article shows how these resources can be added to Funnelback and how to reference them from a search results template.
Adding web resources to Funnelback
The Modern UI allows CSS/JS/images to be uploaded via the administration interface to a web resources folder.
To do this requires access to the Funnelback administration interface.
- Log in to the administration interface - the address will be similar to https://FUNNELBACK-SERVER:8443/search/admin/
- Change to the collection and profile that needs to host the files.
- Select browse collection configuration files from the administer tab.
- In the file display that loads locate a section labelled web resources (preview) for the profile. Use the upload control within this section to upload the files.
- Once the files are uploaded then need to be published before they can be accessed.
Access web resources from Freemarker
Once uploaded and published items within this web folder can be accessed from templates using the following web path. e.g. to access a file called filename.jpg from the web resources folder use the following link:
<a href="/s/resources/${question.collection.id}/${question.profile"}/filename.jpg" />
Further reading
Funnelback documentation: Web resources folder
- Custom collections - adding custom jar files
- WebDAV sites
- Create fact tables to debug analytics update errors
- Crawler out of memory: java.lang.OutOfMemoryError: Java heap space
- Replace string across multiple analytics log files
- Error: open in Trim security plugin v2 trim_femmap_all_of():: No such file or directory