LAILAPS Portlet

The portlet enables to embed LAILAPS into a any web site. A Javascript library provide the query text box, which can be anchored at any place in the site.

Use the Portlet

  1. include the js file in the HTML source of your web page:
    <script type="text/javascript" src="http://lailaps.ipk-gatersleben.de/client/lailapsportlet.js"></script> 
    
  2. embed portlet into web site:
    <body onload="new lailaps_portlet({
    	parentid:'lailaps.searchportlet',
    	url:'http://webapps.ipk-gatersleben.de/lailaps/',
    	client_label:'lailaps_web_site',
    	hiddenProfileID:'-1',
    	target:'lailaps',
    	highlight_keyword_search:true,
    	linkdatabases: 'EnsemblPlants,PlantsDB'});"
    	>
    

Parameter

The Javascript function lailaps_portlet has 7 parameters:
  • parentid: html anchor element id, the javascript library will create search form as it's child element, it could be a id of div or span or td,
  • url: LAILAPS service URL - per default, the portlet is link to LAILAPS installation at IPK; Note: don't forget the "/" end of the URL
  • client_label: label to seperate client portlet sessions
  • hiddenProfileID: is used to identify differnt user profiles in LAILAPS, per default use "-1"
  • target: specify the target tab of the result page (like HTML target attribute for hyperlinks)
  • highlight_keyword_search: if set to true, enable direct queries by double click selected text at client webpage
  • linkdatabases: comma seperated list of databases, which shall be linked from search results. Only those databases listed here, will be included in LAILAPS ID mapping. If empty, no filter is applied, all search results will be displayed. Notice: the database names must match exactly those in the connectzed LAILAPS instance.

Sample HTML client site

<html>
  <head>
    <title>my web page</title>
     
    <!-- load portlet code. Note: please specify the full path to the file-->
    <script type="text/javascript" src="http://lailaps.ipk-gatersleben.de/client/lailapsportlet.js"></script>
  </head>
   
  <!-- start the portlet-->
  <body onload="new lailaps_portlet({parentid:'lailaps.searchportlet', url:'http://webapps.ipk-gatersleben.de/lailaps/', client_label:'lailaps_web_site', hiddenProfileID:'-1', target:'lailaps', highlight_keyword_search:true, linkdatabases: 'ensembl,gnpis'});">
   
  <h1>My Personal Web site - Welcome</h1>
   
  <!-- glue portlet to an anchor element-->
  <span id="lailaps.searchportlet"></span>
   
  <p> The mission of my web site is to privide information.</p>
  </body>
</html>