Skip to content
SharePoint Solutions & Products

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.

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

  • Advent calendar
  • JavaScript
  • Microsoft 365
  • SharePoint
  • SharePoint Online

Related articles

Smarter Image Map now available on Microsoft
Interactive process landscape with five connected stages in Smarter Image Map

Smarter Image Map now available on Microsoft Marketplace

Smarter Image Map turns process landscapes, floor plans and diagrams into interactive SharePoint navigation with hotspots, tooltips and drill-down maps.

Read more
SharePoint Archiving: 7 Engineering Lessons
Archive Workspace showing SharePoint sites, archive status, file volumes, and reports

SharePoint Archiving: 7 Engineering Lessons

What we learned about discovery, retries, concurrency, integrity, and consistent evidence while building a customer-controlled SharePoint archive.

Read more

Questions about this topic?

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