Get DSpace 7.6 search box code and use it to other web pages
72 views
Skip to first unread message
Lewatle Johannes Phaladi
unread,
Jan 26, 2024, 4:20:50 AM1/26/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DSpace Technical Support
Dear All,
How to get code for DSpace search box and use it on any website.
Regards,
Lewatle
DSpace Technical Support
unread,
Jan 26, 2024, 11:21:11 AM1/26/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DSpace Technical Support
Hi Lewatle,
At this time, DSpace does not have a custom Javascript "widget" which allows you to embed the searchbox in another page. It would be possible to write though, as that widget would just need to make the same REST API calls (to the DSpace backend) that are made from the search box in the DSpace user interface. Those REST API endpoint calls can be seen in your browser's DevTools as described here: https://wiki.lyrasis.org/display/DSDOC7x/REST+API#RESTAPI-FindingwhichRESTAPIEndpointtouse
So, someone who has a little expertise with Javascript could write a small tool that makes those same REST API calls to run a search in DSpace. It isn't possible though to just copy the existing searchbox out of DSpace into a different website (as the existing searchbox code is written in Angular and would only work on another site that uses Angular).
Tim
Lewatle Johannes Phaladi
unread,
Jan 29, 2024, 7:25:42 AM1/29/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DSpace Technical Support
Hello Tim,
Thanks a lot for the reply, one wish that this can be included on DSpace 8, I will check if there is place where wishes can be posted for the upcoming version. Much appreciated for clear reply.