Showing results for 
Search instead for 
Did you mean: 
Community Member

Has anyone been able to add a Summon search box in Canvas?


I'm trying to add a search box to some Canvas pages which would allow users to search our library e-resources via Summon, our Resource Discovery Tool. Unfortunately the two ways I can find to do this either user Javascript or non-whitelisted HTML tags. 

For example (javascript)

 <script type="text/javascript" ></script><script type="text/javascript">{"id":"s3c0e2fd36d722dba28bbabe05f48b36","logo":"//","endpoint":"//","lang":"en-US","style":{"title_color":"#4d4d4d","link_color":"#214e95","header_color":"#fff","results_color":"#fff","width":"fluid"},"params":{"pn":1,"ho":true,"myinst":"","jt":"","l":"en"},"title":"Summon Widget","searchbutton_text":"Search"})</script>

or (HTML)

<form method="GET" action="">
<input type="text" name="q">
<input type="submit" value="Search">

We had previously managed to get this working using an iFrame but that has recently stopped working as an X-FRAME option on the target page (Summon) being set to ‘deny’

<p style="text-align: center;"><iframe style="width: 90%; height: 650px;"  width="300" height="150"></iframe></p>

Any ideas or suggestions much appreciated.



2 Replies

One way to do this is to add some custom JavaScript to the global JavaScript available through the theme editor. Have it triggered by having a certain ID or class name in the HTML content of the pages where it should appear and replace the content by what needs to be there.

For example, inside Canvas, you could add

<div class="SummonSearch"></div>‍‍

Then your JavaScript could do something like this

document.querySelectorAll('.SummonSearch').forEach(function(e) {
// Add your code here to insert the widget

Note, I didn't have time to produce a complete working example, I've got to leave for work. but I wanted to get something out there.

You do need cooperation of the local Canvas Admin (if that's not you) to do things this way. I've not tested it on Mobile.

I am not familar with Summon, but it looks like a paid service, so you might talk with them about options since you're their customer and they've made it so that you can't use their product that you're paying for.

Community Member

Thanks, this is really helpful!

I have Canvas admin access and am playing around to try and get this working without luck so far. I'm not a developer myself so will see if I can get someone from IT/network to have a look and post back if (hopefully when) we're successful. 

Thanks again for your help,