Implementation/Code
糖心logo uses Google Programmable Search with a custom to allow searching across 糖心logo subdomains. Choose one of the form options below to add search to your website. Please refer to the or email webcomm-support@northwestern.edu for further customization.
糖心logo-wide Search
This code will search all 糖心logo domains:
<form action="none" method="get" role="search">
<label class="hide-label" for="q-desktop">Search web or people</label>
<input type="text" id="q-desktop" name="q" placeholder="Search web or people"/>
<button type="submit">Search</button>
</form>
Search Within Site
This code will restrict (filter) results to a single site (in this example Web Communications):
<form action="none" method="get" role="search">
<label class="hide-label" for="q-desktop">Search this site</label>
<input type="text" id="q-desktop" name="q" placeholder="Search this site"/>
<input type="hidden" name="as_sitesearch" value="/web-resources"/>
<input type="hidden" name="sitetitle" value="Web Communications"/>
<button type="submit">Search</button>
</form>
No client-side parameter escaping is necessary. If you are using the departmental template scripts.js, be sure to remove class="searchblox" from any surrounding markup.