/
Display existing fields in Datafari search UI
Display existing fields in Datafari search UI
Let's say we want to display the field last_modified in the search UI of Datafari
The field is already present in the Solr schema so we just need to display it in the UI.
1.Edit the file main.js located in /opt/datafari/tomcat/webapps/Datafari/js/
nano /opt/datafari/tomcat/webapps/Datafari/js/main.js
And change the line :
Manager.store.addByValue("fl", 'title,url,id,extension');
Add the field you want here, so in our example last_modified :
Manager.store.addByValue("fl", 'title,url,id,extension, last_modified');
2. We now have to edit the file SubClassResultWidget.js : /opt/datafari/tomcat/webapps/Datafari/js/AjaxFranceLabs/widgets/SubClassResultWidget.js
Add the display of your field in the code. For example if you want to add it after the URL of the document :
And finally your Datafari UI should be like that with the field last_modified at the end of each document :
, multiple selections available,
Related content
Add new icon for search results
Add new icon for search results
Read with this
[DEPRECATED] Add custom fields in Datafari and display them
[DEPRECATED] Add custom fields in Datafari and display them
More like this
Save search - technical doc
Save search - technical doc
More like this
Add Direct Links feature into Datafari
Add Direct Links feature into Datafari
More like this
Search Query
Search Query
More like this
Manually adding facets to Ajaxfrancelabs
Manually adding facets to Ajaxfrancelabs
More like this