Generic List Widget
Purpose
Designed as a flexible widget that works with all content types and passes the associated list items to a widget view, that’s rendered on the site.
Features
- Provides a list of items from any associated SharePoint list
- Displays and orders the items based upon the query defined in the viewxml on the widget property, which determines the order and content that gets displayed
Details
- Widget Name: GenericListWidget
- Available With: Release 4.1 and Above
- Content App Type: Any
- Content Type: Can be used with all content types
- Content App Name: Any
- List Name: Can be used with any list name
- Recommended Images Sizes: N/A
- Dependencies: SharePoint List
Content
N/A
Properties
List is on Root Site | When checked, the widget references the list on parent/root site collection. | |
Selected list columns |
|
|
Enable Paging | If false, the widget will not display paging controls
If true, the widget will display paging controls (if implemented by developer in widget) |
|
Items/Page | Sets the number of items to display on each page IF paging is enabled. | |
List Name | Name of the SharePoint list that contains the data to be displayed for this widget instance. | |
Function to call after fetching data | OOTB -Blank (used for widget expansion): Name of the function called after data has been fetched by the widget. | |
isasynccallback | If true then the call back method runs asynchronously | |
viewxml | The viewxml contains any special manipulation of the data that needs to be done by the widget BEFORE it gets render by the specified view. In this case, the viewxml is set to the following query string:
<View><Query><OrderBy><FieldRef Name=’Start_x0020_Date’ Ascending=’FALSE’></FieldRef></OrderBy><Where><And><Leq><FieldRef Name=’Start_x0020_Date’ ></FieldRef><Value IncludeTimeValue=’TRUE’ Type=’DateTime’><Today ></Today></Value></Leq><Or><Geq><FieldRef Name=’Expires’ ></FieldRef><Value IncludeTimeValue=’TRUE’ Type=’DateTime’><Today ></Today></Value></Geq><IsNull><FieldRef Name=’Expires’ ></FieldRef></IsNull></Or></And></Where></Query><RowLimit>4</RowLimit></View> Note that the number of items (Rows) to display on the site is specified in the <RowLimit>4</RowLimit> argument. |
|
callbacktype | Determines the type of call back method, if customdataload then the call back method will pull the dataloadproperties as the call back’s arguments | |
dataloadproperties | Arguments pulled into the call back method if the callbacktype = customdataload. Click here to learn more about dataloadproperties and call back methods | |
cache interval | Sets the time (in secs) that the data should be saved in the local browser cache of the current user.
0 = do not cache the data for this widget -1 = use the default caching strategy set in the Digital Workplace configuration [whole number] = cache for specified time (secs) |
|
Order By | Field that the items are ordered by | |
Order Direction | Order (ascending, descending) that the widget displays | |
Function to call before binding the UI events | OOTB -Blank (used for widget expansion): Name of the function called after the UI has been rendered to the screen | |
Site Collection URL | Site collection URL where the SharePoint list defined in “List Name” can be found. |
Views
Each view for the Generic List widget is driven by the instance of the widget it’s working with. Akumina deploys and uses the Generic List widget on several pages on the default site.
For example, on the default site, the News Listing page uses the Generic List Widget to display all active (respects start date and expired) news articles associated with the SharePoint list, FoundationNews_AK. The news articles are displayed in descending order.
The following views are set on this widget definition:
View Name: Modern News List – Full
View Description: Displays content from a SharePoint list, usually a news or interior page type list. This view displays all items (full list) of what ever is set in the “Select list column”, it respects “Start Date” and Expire, which is controlled via the query defined in the widget property “viewxml”.
View Preview:
View Name: Modern News List
View Description: Displays content from a SharePoint list, usually a news or interior page type list. This view displays a select number of items that is set in the “Select list column”, it respects “Start Date” and Expire, and a row limit of items to display, which is controlled via the query defined in the widget property “viewxml”.
View Preview: