Displaying count badges for custom mini portlets
The mini view of portlets display a badge, which indicates the number of tasks associated with that portlet.
The badge value is returned from a mashup output. You must configure the mashup ID that needs to
be invoked as part of the miniPortletCountConfig
JSON in
<store-temp>/extensions/override-static-assets/portlets/config/isf-persona-config.json.
For more information about the miniPortletCountConfig
attribute, see Associating new portlets with an appropriate view.
The following JSON illustrates the sample configuration for
miniPortletCountConfig
:{
"portletTitleBundleKey": "customerPickupPortlet.TITLE_CustomerPickupExtnPortlet",
"portletTID": "CustomerPickupPortletExtnComponent",
"portletSequenceNumber": 40,
"portletComponent": "CustomerPickupPortletExtnComponent",
"portletIconClass": "app-icon-customer-pickup",
"portletColor": "#9772b2",
"resourceId": "ISF000024",
"displayPortletTitleName": false,
"miniPortletCountProvider": "getCustomerPickupCounts",
"miniPortletCountConfig": {
"mashupIDForMiniPortletCount":"isf.home.portlets.fulfillment.customerPickup",
"miniPortletCountpath":"Shipments.TotalNumberOfRecords"
},
"requiresMultiLocation": false,
"requiresInventory": false,
"sitemap": [
{
"portletBundleKey": "sitemap.TITLE_CustomerPickupPortlet",
"relativeUrl": "customer-pickup/customer-pickup-list"
}
]
}
In the sample configuration, to retrieve the badge count value, the mashup with
"isf.home.portlets.fulfillment.customerPickup"
mashup ID is invoked. From the
mashup output, the badge count value is retrieved from
"Shipments.TotalNumberOfRecords"
xpath.