Web resources
Linked external resources
Most templates often rely on external resources such as image, JavaScript and CSS files.
These external resources can be stored at any web-accessible location such as your public web server and referenced as external resources from the template using absolute URLs.
Funnelback also provides web resource folders that can be used for local storage of these files. Web resource folders are associated with the folders that contain the search template files.
Web resources can also be managed by mounting Funnelback on your computer using a compatible WebDAV client.
The URL of a web resources folder is constructed using the following pattern: <PROTOCOL>://<FUNNELBACK-SERVER-NAME>/s/resources/<SEARCH-PACKAGE-ID>/<RESULTS-PAGE-ID>/<FILE-NAME>
where:
-
PROTOCOL is either http or https
-
FUNNELBACK-SERVER-NAME is the hostname of the Funnelback server. If referencing from a template the FUNNELBACK-SERVER-NAME and protocol can be omitted and presented as a relative link.
-
SEARCH-PACKAGE-ID is the collection containing the resource. (This can be copied from the collection parameter in the URL of the file manager). When accessing a resource from within a search template SEARCH-PACKAGE-ID should be replaced with
${question.collection.id}
-
RESULTS-PAGE-ID is the profile containing the resource (this can be copied from the profile parameter in the URL of the file manager). When accessing a resource from within a search template RESULTS-PAGE-ID should be replaced with
${question.profile}
-
FILE-NAME is the filename of the web resource.
E.g. a link to a resource from a template styles.css
might be:
<link rel="stylesheet" href="/s/resources/${question.collection.id}/${question.profile}/styles.css" />
Editing
The content Funnelback provides via the web resources mechanism can be edited in the search dashboard for each service.
The 'Edit Web Resources' button on the home page will take you to the interface which allows files to be uploaded, added, edited or removed and published from preview to live and folders to be created, deleted and published/unpublished.
Please be aware that publishing a file within a folder requires that all parent directories are first published. Folders also include a 'Publish all' button which will publish all changes within them in a single click.
Content in these directories can also be accessed and edited via a WebDAV client application. Such an application allows familiar local editor applications to be used and also allows easy uploading of existing directory structures. Please see managing configurations templates and web resources using WebDAV for further details.