Bundle Template
The Bundle Template control displays one package from the Arlo Storefront Packages API. Its bundled template includes the package details, included course items, and an Upcoming Events sub-control for each course.
Getting Started
Follow the general getting started guide, add a target element, and configure the control.
document.addEventListener("arlojscontrolsloaded", function () {
const bundleTemplateControl = {
moduleType: "BundleTemplate",
targetElement: "#bundle-detail",
regionCode: "default",
maxCount: 3,
overwritePageTitle: true,
customUrls: {
eventtemplate: "/course"
}
};
new ArloWebControls().start({
platformID: "your-platform.arlo.co",
modules: [bundleTemplateControl]
});
});
The control resolves the package from ?package=<id> or ?package=<id>-<slug> in the page URL. Set packageID when a fixed package should be shown or when the URL does not provide a package.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| packageID | number | The package to display when no package ID is present in the configured URL parameter. | |
| regionCode | string | default | The Storefront region used to retrieve the package. |
| queryStringConfig | array | package | The URL parameter names to check for a package ID. |
| maxCount | number | 3 | The maximum number of upcoming dates shown for each included course. |
| eventsTemplate | string | The template selector for the per-course Upcoming Events sub-controls. | |
| overwritePageTitle | boolean | false | Replaces the browser page title with the package name. |
| customUrls.eventtemplate | string | The URL used by the included Upcoming Events controls for event-template links. | |
| noResultsText | string | The message displayed when the package has no course items. | |
| message | string | The loading placeholder message. |
Template Data
The bundled template provides package fields including name, code, availability, Summary, Description, AdvertisedDuration, HeroImageUri, ListImageUri, BestOffer, ComparativeOffer, and Items. Each item includes its package-item data and template data. Custom templates can use formatOffer(offer, preferInclusive) and renderDescription(markdown).
