This documentation describes how to create and maintain list widgets in Pika.
Table of Contents
Table of Contents |
---|
Anchor | ||||
---|---|---|---|---|
|
Table of Contents |
---|
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 the 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 ListWidgetList 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 ListWidgetList Widget button to create a new list widget.
Library
Library is a dropdown menu that limits the availability of the widget. If the widget can be used by all libraries, set it to All Libraries. If the widget is unique for your library, assign Choose your library in this field – when you assign . When a specific library is assigned, only admin patrons at your library will be able to view and edit the widget. Name is used to name the
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
is used to show the title when the widget is turned on. This is the bar between the tabs and the scrolling titles. Enabling the Show More Link will force the title bar to be shown as wellIf 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
theview more
Show the View More link on the title bar of the widget controls where the View More link is shown. This will link back to the catalog with the search for more items from the tab that was chosen.
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.
Here is an example of an item from the list of New eBooks when the View More link is clicked.
Display mode for search results
Display mode for search results link is used to show full search results when the View More Link is checked.
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 .
Next, 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 items titles in your widget.
The 1st setting determines if a title is displayed under the item.
Here is an example of a widget that has the title listed under the item. As well as one without the title.
The 2nd 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.
The 3rd setting determines if the rating is displayed under the item.
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.
Note |
---|
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.
Note |
---|
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.
Note |
---|
There are no user controls in the Single Title style. If more than one title is being displayed, you should enable auto rotation so patrons can see all titles. |
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 widget that has the ratings listed under the item. As well as one without the rating.
The Style to use when displaying the list widget determines the overall styles you can have for the widget. Horizontal is the default style. Use the drop down menu to change the style of a list widget.
Here is an example of a Horizontal widget.
The Vertical style can be used as a sidebar feature.
Here is an example of a Vertical widget. The title, author and ratings do not show up on this type of widget. As well as an example of a Vertical widget used as a sidebar on a library homepage.
The Single Title style will display only one title.
Here is an example of the Single Title style. There are no user controls on the Single Title. If more than one title is being displayed, you should enable auto rotation so patrons can see all titles.
The Single Title with a Next Button style will display only one title, but will have user controls.
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.
The Text Only List style will display the information without images.
Here is an example of the Text Only List.
Another setting is should the widget automatically rotate between titles. This will work on both the Horizontal, Vertical and Single Title widgets. The titles will rotate without having to be manually advanced.
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.
The Custom CSS File is for styling the widget for your website. You have to host the CSS for the widget on your website. The URL would be added to the box below Custom CSS File.
Marmot recommends that you add custom CSS for widgets on your Pika Admin page under Additional CSS. Your library account must have the Library Admin or OPAC Admin role in Pika to access these settings. You would go to Pika Configuration, Library Systems.
Click on the Library Id or Edit link to open up the settings for your library.
Click onthe Basic Display tab. This applies CSS for your catalog, but Marmot also loads the styling when displaying widgets. Here is an example of what CSS looks like when displayed in the Additional CSS box.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 which is the most common to use.
Here is an example of the Drop Down List style which gives the user the option to pick which tab they want to see.Lists is a way to add a list to display within the widget. Click the Add New button to add a list.
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.
Note |
---|
Marmot recommends that you add custom CSS for widgets on your Pika Admin page under Additional CSS. |
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 Notessection is the preview for the most basic list widget. The second, under the List Widget with Resizing Integration Notesis 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 also add a list to your List Widget. This is a list that you would have already created. The list must be made public in order for it to be used. Once signed in, click MY LISTS located under the My Account tab.
This will display all your lists. Click on the 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 Otherwise, you will not see the Create Widget button.
Once the list has been made public, the Admin Options button will appearPublic lists will have the necessary Admin Options. Click on the drop-down menu and choose Create Widget.
The name of the tab should match your list. Click Create Widget to add the list. Any changes you make to the original list will show up in the widget. It may take 5 – 6 minutes for any changes to the list to be seen in the List Widget. You do not have to edit the list from the List Widget to make the changes.
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 widgetoption 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.
The Lists will show the Name, Display For, and Source. The Display For has a drop down menu to change how the list will display.
Creating a List Widget from Search Results
Another way to You can create a List Widget can start with a Search, or use a Browse Category.
Build a search to use as the source for your 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 your 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 box dialog will appearpopup. Select a widget dropdown that will stay “Create a new widget.” For the creation of a new widget, the New Widget Name/New Tab Name is displayed as the tab name or in the title bar when the widget is turned on. There is a limit of 25 titles for lists based on searches.
Once you name your new widget, click on the Create Widget button.
This will bring you to the admin page that includes all the settings for this List Widget.
You can see a Live Preview of your List Widget at the bottom of the page List Widget admin page.
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 widgetoption 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 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.
Info |
---|
The iframe does not resize well for mobile devices. |
. The width and height may need to be changed to fit on your website.
Info |
---|
The basic iframe does not resize well for mobile devices. |
Note |
---|
Please be mindful of the accessibility requirements for the iframe, specifically providing an iframe title for the widget. There is linked documentation in the integration notes. |
Note |
---|
When inserting the widget title in the iframe code, remove the brackets from the code, leaving only the quotation marks around the title you’re providing e.g. title=”Embedded Widget Title” |
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.
Info |
---|
This code will resize widgets on mobile devices. |
website.
Info |
---|
This code will resize widgets on mobile devices. |
Note |
---|
Please be mindful of the accessibility requirements for the iframe, specifically providing an iframe title for the widget. There is linked documentation in the integration notes. |
Note |
---|
When inserting the widget title in the iframe code, remove the brackets from the code, leaving only the quotation marks around the title you’re providing e.g. title=”Embedded Widget Title” |
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.
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- Multiple Widgets placed through outthroughout 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
Page Properties | ||||||
---|---|---|---|---|---|---|
|