Creating List Widgets
This documentation describes how to create and maintain list widgets in Pika.
- 1 What are List Widgets?
- 2 Getting started
- 3 Creating a widget and widget options
- 3.1 Library
- 3.2 Name
- 3.3 Show the list widget’s title bar
- 3.4 Show view more
- 3.5 Display mode for search results
- 3.6 Description
- 3.7 Should description pop-up
- 3.8 Number of titles display
- 3.9 Title information display options
- 3.10 Style to use when displaying the list widget
- 3.10.1 Horizontal
- 3.10.2 Vertical
- 3.10.3 Single Title
- 3.10.4 Single Title with Next Button
- 3.10.5 Text Only List
- 3.11 Auto Rotation option
- 3.12 Cover Size
- 3.13 Custom CSS
- 3.14 Display lists as
- 3.15 Lists
- 3.16 Live Preview
- 4 Creating a List Widget from User List or adding a User List as a List Widget tab
- 5 Creating a List Widget from Search Results
- 6 iFrame Embed Code
- 7 List Widget with Resizing Embed Code
- 8 Adding multiple List Widgets to a website
- 9 Related Documentation
What are List Widgets?
The basic idea of a List Widget is to embed a search or list from Pika on your library homepage for display. List widgets are a seamless way to display targeted content from the catalog on your website and direct patrons to titles in the catalog directly from your library website.
Widgets embedded on webpages always display starting somewhere in the middle of their respective sources (list or search) rather than at the very beginning/left hand side. This is by design so the results don’t appear empty on webpages.
Getting started
In order to create the List Widget, you must be signed in. Your account must have a user role of library admin or content editor. A content editor has permissions to create List Widgets, editorial reviews and Browse Categories.
Once you’re logged in, click on the List Widget link under the Pika Configuration tab.
Click on the Add New List Widget button to create a new widget.
You can also find a widget you have already created by narrowing down the search by Id, Library, or Name. You can edit existing widgets by clicking on the Edit link under Actions.
Creating a widget and widget options
Click on the Add New List Widget button to create a new list widget.
Library
Library is a dropdown menu that limits the availability of the widget. Choose your library in this field. When a specific library is assigned, only admin patrons at your library will be able to edit the widget.
If the widget can be used by all libraries, set the library value to All Libraries. (This is not a common setting)
Name
Name is the title of your widget.
Show the list widget’s title bar
If the Show the list widget’s title bar option is enabled, the text from the Name field for the widget will display in the bar if the widget only has a single tab. If there is more than one tab in the widget, the Name will not display in the title bar.
Here is an example of the Show the list widget’s title bar.
Show view more
Show the View More link on the title bar of the widget controls where the View More link is shown. When a user clicks on the View More link in a widget, they will be directed to the search results or list that is the source for the widget
Here is an example of the View More link that shows up when the Show the View More Link on the title bar of the widget is checked.
Display mode for search results
Display mode for search results link is used to show full search results when the View More link option is enabled and the source for the widget is search results.
Description
Description is for internal use. You can copy and paste any search strings used to create the widget or the list ID if you’re using a list for a source.
Should description pop-up
Should the description pop-up be shown when hovering over titles? Is used when you want to have a description show when someone hovers over a title.
Number of titles display
The number of titles that should be shown for the widget option is used to limit the amount of titles that display in the widget. The default value is 25 and likely should not be changed, especially if the search results that are referenced are quite large
Title information display options
There are three settings that can be chosen to show information about the titles in your widget.
Should the title for the currently selected item be shown?
Should the author (catalog items) /format (archive items) for the currently selected item be shown?
Should ratings widgets be shown under each cover?
All three options can be enabled in conjunction with one another, you can enable a single option, or you can enable a combination of any two options.
If both title and author name are enabled or all three options are enabled, you will need to adjust the height of the widget in the iframe to accommodate the Auto Rotation option.
Should the title for the currently selected item be shown
When this option is enabled, the title will display under the cover art in the carousel.
Here is an example of a widget that has the title listed under the item, as well as one without the title.
Should the author (catalog items)/format (archive items) for the currently selected item be shown
This setting determines if the author’s name is displayed under the item.
Here is an example of a widget that has the author listed under the item, as well as one without the author.
Should ratings widgets be shown under each cover
This setting determines if the rating is displayed under the item.
Here is an example of a widget that has the ratings listed under the item, as well as one without the rating.
Below is an example of a widget with all three display options enabled.
Style to use when displaying the list widget
There are several options for widget display styles. Use the drop down menu to change the style of a list widget.
Horizontal
Vertical
Single Title
Single Title with Next Button
Text Only List
Horizontal
Here is an example of a Horizontal widget.
Vertical
Here is an example of a Vertical widget.
The title and author do not display in this display style, even if enabled.
Single Title
The Single Title style will display only one title.
Here is an example of the Single Title style.
Single Title with Next Button
The Single Title with a Next Button style will display only one title and includes user controls with the Next button.
Here is an example of the Single Title with a Next Button. The user will have control to scroll through the items.
Here is an example of a library that is using multiple Single Title with a Next Button to display books, movies, music and games.
Text Only List
The Text Only List style will display the information without images.
Here is an example of the Text Only List.
Auto Rotation option
The should the widget automatically rotate between titles option forces the the carousel to advance automatically. You can enable this option on the Horizontal, Vertical, and Single Title widgets.
If this option is enabled, a Play/Pause button will display in the widget which will allow users to pause the auto-rotation to meet accessibility standards.
Cover Size
The cover size to use when showing a widget has a drop down choice of Small or Medium.
Here is an example of the Small cover size on a Horizontal widget.
Here is an example of the Medium cover size on a Horizontal widget.
Custom CSS
The Custom CSS File is for styling the widget for your website. If you use this option in the widget, the corresponding CSS file for the widget should be hosted on your website. The URL to the hosted Custom CSS File is entered in the Custom CSS File field.
Display lists as
The Display lists as is a function that determines how you display multiple lists within one List Widget. There is a Tabbed Display or a Drop Down List.
Here is an example of the Tabbed Display style. The Tabbed Display is the most common option
Here is an example of the Drop Down List style. The Drop Down List style allows users to choose the widget tab they wish to view from the drop down menu at the top of the widget.
Lists
The Lists table controls the various tabs that are applied to a list widget.
The Name in the Lists table is the title of the given tab. The Source field is what Pika uses to reference the source list or search for the specific tab. You can drag and drop with the arrows in the Sort column to reorder the tabs. Use the Add New button to create a new tab in the existing widget.
Live Preview
You can view the changes you’ve committed to the widget in real time with the Live Preview. There are two Live Preview windows in the form. The first, under the List Widget Integration Notes section is the preview for the most basic list widget. The second, under the List Widget with Resizing Integration Notes is the preview for the same widget with automatic resizing.
Basic preview
Preview with resizing
You can also use the Preview Widget as a Page option to preview your widget on a separate webpage, which will more accurately represent what the widget might look like on a webpage on your library website. Right click the button to open the preview webpage in a new tab.
Creating a List Widget from User List or adding a User List as a List Widget tab
You can add to an existing list widget or create a new list widget from the admin controls in a public User List.
In the My Lists page in the Account, choose a public list that you would like to add to your List Widget.
If the Make Public button is showing, click it to make your list public. Otherwise, you will not see the Create Widget button.
Public lists will have the necessary Admin Options. Click on the drop-down menu and choose Create Widget.
Use the Select a widget menu to select an existing widget if you want to add the list as a tab to an existing widget. If you want to create a new widget from the list, choose the Create a new widget option from the Select a widget menu. Add a relevant name in the New Widget Name / New Tab Name field and click Create widget to complete the action.
Here is an example of a list that has been added to the List Widget.
Creating a List Widget from Search Results
You can create a List Widget from Search results or use the search results that populate an existing Browse Category.
If you’re creating a list widget from unique search results, build the desired search to use as the source for your List Widget. If you’re creating a list widget from a browse category search, click on the title of the browse category next to the spyglass icon to access the search results that populate the browse category.
At the bottom of the page of the desired search results click on Create Widget (you must be logged in with your Pika admin account to see this option).
The Create a Widget dialog will popup. Use the Select a widget menu to select an existing widget if you want to add the search as a tab to an existing widget. If you want to create a new widget from the search results, choose the Create a new widget option from the Select a widget menu. Add a relevant name in the New Widget Name / New Tab Name field and click Create widget to complete the action.
Completing the action will direct you to the List Widget admin page for the new widget or the widget you added the search to as a tab, respectively.
iFrame Embed Code
In the widget admin page, scroll down to the Integration notes. You will see the iframe code. If the widget is finished, you can copy the HTML code for the iframe and embed it into your library website. The width and height may need to be changed to fit on your website.
List Widget with Resizing Embed Code
Scroll down to the List Widget with Resizing and Integration notes. Copy the entire code to use to embed into your website.
Adding multiple List Widgets to a website
You will not need all of the code for each widget. Below is an example mark-up for multiple widgets, and the inclusion of the resizing code just once.
You will need an additional Jquery line jQuery("#listWidget178").iFrameResize(); for each widget that is on the page.
<!-- Multiple Widgets placed throughout Page -->
<iframe id="listWidget178" onload="setWidgetSizing(this, 30)" src="http://opac.marmot.org/API/SearchAPI?method=getListWidget&id=178&resizeIframe=on" width="650" scrolling="no"></iframe>
<!-- 2nd widget -->
<iframe id="listWidget179" onload="setWidgetSizing(this, 30)" src="http://opac.marmot.org/API/SearchAPI?method=getListWidget&id=179&resizeIframe=on" width="650" scrolling="no"></iframe>
<!-- 3rd widget -->
<iframe id="listWidget180" onload="setWidgetSizing(this, 30)" src="http://opac.marmot.org/API/SearchAPI?method=getListWidget&id=180&resizeIframe=on" width="650" scrolling="no"></iframe>
<!-- Add this code just once, adding a iFrameResize( ) line for each additional widget -->
<!-- Horizontal Resizing : Based on Iframe Content -->
<script type="text/javascript" src="http://opac.marmot.org/js/iframeResizer/iframeResizer.min.js"></script>
<script type="text/javascript">
jQuery("#listWidget178").iFrameResize();
jQuery("#listWidget179").iFrameResize(); /* 2nd widget */
jQuery("#listWidget180").iFrameResize(); /* 3rd widget */
</script>
<!-- Vertical Resizing : When Iframe is larger than viewport width,
resize to 100% of browser width - 2 * padding (in px) -->
<script type="text/javascript">
setWidgetSizing = function(iframe, OutsidePadding){
originalWidth = jQuery(iframe).width();
wasResized = false;
jQuery(window).resize(function(){
resizeWidgetWidth(iframe, OutsidePadding);
}).resize();
};
resizeWidgetWidth = function(iframe, padding){
if (padding == undefined) padding = 4;
var viewPortWidth = jQuery(window).width(),
newWidth = viewPortWidth - 2*padding,
width = jQuery(iframe).width();
if (width > newWidth) {
wasResized = true;
return jQuery(iframe).width(newWidth);
}
if (wasResized && originalWidth + 2*padding < viewPortWidth){
wasResized = false;
return jQuery(iframe).width(originalWidth);
}
};
</script>
Related Documentation
-
Detailed Pika Administrator Roles (Marmot Knowledge Base)
-
NoveList Information (Marmot Knowledge Base)
-
Masquerade Mode (Marmot Knowledge Base)
-
HTML Text Editor (Marmot Knowledge Base)
-
Enable Pika Offline Mode (Marmot Knowledge Base)
-
Pika Translation Maps (Marmot Knowledge Base)
-
Student Reports (Pika) (Marmot Knowledge Base)
-
Reporting Incorrect Cover Art or Descriptions in Pika (Marmot Knowledge Base)
-
Records Not to Merge/Manual Ungrouping (Marmot Knowledge Base)
-
Populating, Updating, and Utilizing New York Times Lists (Marmot Knowledge Base)
-
Pika Indexing Profiles (Marmot Knowledge Base)
-
Sidebar and Header Links (Marmot Knowledge Base)
-
Holidays (Marmot Knowledge Base)
-
Records Owned and Included (Marmot Knowledge Base)
-
Library Location Configuration (Marmot Knowledge Base)