Akumina dynamic pages - akumina/AkuminaTraining GitHub Wiki

Applies to:

Akumina Foundation Site 4.0.0.0 and later

Overview

Within the Akumina Framework, there is the need to report if the page is found. This takes a variety of forms but is most often on a detail page, if the content is not found or expired then the page is considered "not found".

This impacts the page indexing for the following widgets and pages:

  • “Normal” SP pages that have been removed/never existed.
  • Generic Item control
  • Event Detail Control
  • Content block

Operational Use cases:

  • “Normal” SP pages that have been removed/never existed – if the current page is the notfound page, take the url that is not found and de-index it.
  • Generic Item control – If the control has no content, then It fires the “/page/notfound/” event, which causes the indexer to de index the page if it is there. Control assumes it is the primary content for the page.
  • Event Detail Control – If the control has no content, then It fires the “/page/notfound/” event, which causes the indexer to de index the page if it is there. Control assumes it is the primary content for the page.
  • Content block – There is a property “primarycontent” on this control – that determines whether the content should trigger a pagenotfound message.
    • The thought there is if the content is just part of the page, such as the site alert, then if there is no content it should still index the page. However if it is the primary content on the page, then it shall trigger a page not found.
    • If the control has no content and it is the primary content, then It fires the “/page/notfound/” event, which causes the indexer to de index the page if it is there.

SiteContext Properties:

The SiteContext object has a property that sets if the page is not "found" according to the Akumina framework.

Property Description
PageNotFound whether the page has/has not been found. This will be true either if we are on the notFound page (pagenotfounderror.aspx or a widget reports that the primary content is not found – more on this below).

This property can be accessed via the following call:

Akumina.Digispace.SiteContext.PageNotFound
true

ConfigurationContext Properties

The ConfigurationContext object has a property representing the SharePoint not found page.

Property Description
NotFoundPage By default is pages/pagenotfounderror.aspx
IsNotFoundPage is the current page the above configured page? true or false

By Default is pages/pagenotfounderror.aspx as this is the SharePoint default, but it can be overridden with the key "NotFoundPage" in the digispace config

Events

The event '/page/notfound/' is subscribed to CoreSteps.IndexPageData.PageNotFound, which changes Akumina.Digispace.SiteContext.PageNotFound = true;

If during the index process, the value Akumina.Digispace.SiteContext.PageNotFound == true, then the page is de-indexed from the Akumina search index (PageData_AK).