Embedding a Primo Search Tile
This page is specific to the classic Primo UI. Refer to the following pages for your environment:
-
New Primo UI: Creating a Search Box With Deep Links to the New UI
The Primo Search tile displays on the Front End user interface.
![PrimoSearchTile3.png](https://knowledge.exlibrisgroup.com/@api/deki/files/29158/PrimoSearchTile3.png?revision=1)
Primo Search Tile
It contains the following components:
-
Search field
-
pull-down lists (combo fields)
-
preconfigured tabs
-
links (Preferences and Advanced Search).
When you embed the search tile into an <iframe> element of an HTML file, you can configure these components. In addition, you can configure where the search results display.
To embed a Primo Search Tile into an HTML file:
-
Embed the following link in an <iframe> element of any HTML file:http://FE_hostname:port/primo_library/libweb/action/search.do?embed=true
-
To customize the embedded search tile, append additional parameters to the link, separating parameters by &. For more information on each parameter, see the following table. Note that the parameters are case sensitive.The following example shows a link that embeds a Search tile that includes the Advanced Search link and displays search results in a new window:<IFRAME ID="Primosearch" FRAMEBORDER="0" SCROLLING="NO" WIDTH="750" HEIGHT="300" src=http://server:1701/primo_library/libweb/action/search.do?vid=Auto1&embed=true&resloc=_blank&sadvanced=true>
</IFRAME>Embedded Search Tile Parameters Parameter Description bgcolorSpecify a CSS class name to modify the appearance of the Search tile. The default CSS class is search_bg.For more information on modifying the look of Primo's Front End, see Customizing Primo’s User Interface.bgcolor2Specify a CSS class name to modify the appearance of the Search tile. The default CSS class is search.For more information on modifying the look of Primo's Front End, see Customizing Primo’s User Interface.combo1Specify whether to display the Resource Type drop-down list for your view. Valid values are true or false. *combo2Specify whether to display the Search Target drop-down list for your view. Valid values are true or false.*combo3Specify whether to display the Search Operators drop-down list for your view. Valid values are true or false. *combo4Specify whether to display the Search Scope drop-down list for your view. Valid values are true or false.*embedSpecify true to display the embedded Search tile in your local site. Valid values are true or false.This field is required.heightSpecify the height of the Primo Search tile in pixels. If you do not specify this parameter, the height defaults to the size provided by the Primo Front End.languageSpecify a locale for the display language, such as fr_FR. If no locale is specified, the default locale for the view is used.reslocSpecify one of the following values to indicate where to display the results:-
_self—Opens the search results in the same <iframe>.
-
_parent—Opens the search results in the parent window.
-
_blank—Opens the search results in a new window.
If you do not specify this parameter, the results display in a new window.sadvancedSpecify true to display the Advanced Search link in the embedded Primo Search tile. Valid values are true or false.sbrowseSpecify true to display the Browse Search link in the embedded Primo Search tile. Valid values are true or false. The default value is false.sbuttonSpecify a CSS class name to use a different Search button on your Search tile. The default CSS class is go.For more information on modifying the look of Primo's Front End, see Customizing Primo’s User Interface.slabelSpecify the text that displays above the search field. If you do not specify this parameter, the Search tile displays the Primo default text: Search for.spreferencesSpecify true to display the Preferences link in the embedded Primo Search tile. Valid values are true or false.vidSpecify the view ID (Code field in View wizard) of the view that you want to display for the embedded Search tile.If you do not specify this parameter, the local site will display the default view for the Primo Front End.widthSpecify the width of the Primo Search tile in pixels. If you do not specify this parameter, the width defaults to the size provided by the Primo Front End.The width of the search field determines the minimum width of the Search tile. See the description of the sbwidth parameter for more information.tabSpecify the search tabs to display on the Search tile. If you do not specify this parameter, the Search tile displays all tabs for your view.sbwidthSpecify the width of the Search field in em units. If you do not specify this parameter, the width defaults to the size provided by the Primo Front End.* By default, Primo displays all valid drop-down lists for your view. To omit this drop-down list, specify false. -