Notes
Notes
- This component does not use a datasource item. It renders a client-side DataTables table populated via API calls.
- Favorites data is fetched from
GET /api/businesshub/favesand cached inlocalStorage(key:__favesCache) with a 5-minute expiry and hash integrity check. - The table auto-refreshes every 5 seconds via
setInterval. A custom eventfavemanager:loadedis dispatched on the document after each load. - Adding a favorite:
POST /api/businesshub/favesadd?item={id}. Removing:POST /api/businesshub/favesremove?item={id}. Both invalidate the cache and reload. - A Bootstrap modal prompts the user to confirm before removing a favorite ("Are you sure you want to remove this item from your favourites?").
- Requires jQuery and DataTables CDN scripts injected at body bottom. The component is fixed at
col-12 col-md-6width. - If the user is not authenticated (
window.user.isAuthenticated === falseor 401 response), the API fetch is skipped silently.
Control Properties
Favorites
Displays the authenticated user's favorited content items. Supports adding and removing favorites via toggle, organizing saved content, and quick-access navigation to previously bookmarked resources.
Control Properties
| Property | Type | Description |
|---|---|---|
| PageSize | Single-Line Text (numeric) | Number of rows displayed per page in the DataTables table. Defaults to 10 if not set or not a valid integer. |
| AddClass | Single-Line Text | Additional CSS classes appended to the component wrapper element. |
Template Properties
Template Properties
This component does not use a datasource template. All data is fetched client-side from the Business Hub Favorites API based on the authenticated user's session.