Skip to content

Publishing the Smarter Advent Calendar in the SharePoint Store

See how we streamlined setup, added an editing mode, and introduced custom backgrounds for the Smarter Advent Calendar.

Historical article: the setup and features below describe the version available at publication. See the current Smarter Engagement Calendar (formerly Smarter Advent Calendar) and current installation guide for today’s product.

Christmas sweets are already back on supermarket shelves – the perfect reminder to give our Smarter Advent Calendar some love. In this article we share the improvements that will let us publish the solution in the SharePoint Store.

Automated provisioning of SharePoint lists

After installing the web part from the store, all required SharePoint lists are created automatically the first time the web part loads. We add the necessary fields to each list and include them in the default view, saving administrators the manual configuration effort. For the content list we even pre-populate the 24 items – one for each day – so you can immediately start adding text, images, or videos.

// Ensure the list
const adventcalenderContentsListResult = await sp.web.lists.ensure(this.adventcalendarContentsList, undefined, undefined, undefined, { Hidden: true });

// Add fields e.g. "Text"
try {
    await list.fields.getByInternalNameOrTitle("Text").get();
} catch {
    await list.fields.addMultilineText("Text", undefined, true, false, false, true, {
        Description: strings.ContentTextFieldDescription
    });
}

// Add fields to default view
let defaultView = list.defaultView;
let viewFields: any = await defaultView.fields.get();
for (const fieldTitle of fieldTitles) {
    if (!viewFields.Items || viewFields.Items.indexOf(fieldTitle) < 0) {
        await defaultView.fields.add(fieldTitle);
    }
}

// Add all 24 advent calendar door items
for (let i = 1; i < 25; i++) {
    try {
        await list.items.getById(i).get();
    }
    catch (error) {
        await list.items.add({ Title: i.toString() });
    }
}

Editing mode for administrators

A brand-new editing mode is available for administrators via a toggle in the toolbar. Once enabled, selecting a door opens a panel with the edit form for that specific day. Admins can add and save content without leaving the page – perfect for last-minute tweaks.

Advent calendar SharePoint Store: editing mode

Custom background images

Another highlight is the ability to configure a custom background. Admins open the settings via the toolbar, pick an image, and save it. The Advent calendar instantly updates to match the selected design.

Advent calendar SharePoint Store: change background

Interested in the Smarter Advent Calendar or need help setting it up for your organisation? We are happy to support you.

Contact us

Related articles

Smarter Advent Calendar becomes Smarter Engagement
Smarter Engagement Calendar in the Launch design with doors for a software launch

Smarter Advent Calendar becomes Smarter Engagement Calendar

Version 1.4: occasions all year, content in four languages, ready-made content packs, new designs, a flexible schedule, new campaigns on the same page and simpler licensing.

Read more
Deploy the Smarter Advent Calendar to the SharePoint

Deploy the Smarter Advent Calendar to the SharePoint Store

How we made our Smarter Advent Calendar web part SharePoint Store–ready: automatic list provisioning, admin edit mode, and customizable background images.

Read more
Smarter Advent Calendar Version 1.1.0.0 – New Admin
Smarter Advent Calendar Version 1.1.0.0 – New Admin Features!

Smarter Advent Calendar Version 1.1.0.0 – New Admin Features!

Discover the new version 1.1.0.0 of the Smarter Advent Calendar with improved admin interface, content templates, integrated quiz builder, and enhanced analytics.

Read more

Questions about this topic?

We are happy to help you put this into practice in your environment.