Skip to content

Routing

Overview of the main routing classes

classDiagram
  direction TB
  class ResourceLocation {
    Area
    ExternalRoute
    PageType
  }
  class Product {
    Id
    Url
    Images
    Videos
    Files
    Breadcrumbs
    Fields
  }
  class ProductCategory {
    Id
    Name
    Description
    MetaTitle
    MetaDescription
    MetaKeywords
  }
  ResourceLocation --> "0..1" Product
  ResourceLocation --> "0..1" ProductCategory
  ResourceLocation --> "0..1" CmsArticle

The ResourceLocation is an abstraction describing a relative URL (ExternalRoute) and what it points to.

Out of the box we have four areas we maintain URLs for:

  1. Product. All the pretty URLs for the product detail pages.
  2. Product Category. All the pretty URLs for the product lists.
  3. CMS article. All the pretty URLs for the CMS articles. These are synced from the Bizzkit CMS.
  4. Static pages on the website. This is for instance the basket page and the login page.

In general you can look up a ResourceLocation by ExternalRoute or by the identifiers. If you change an ExternalRoute for an existing ResourceLocation the system will automatically set up a redirect from the old URL to the new one. It does this in a smart way to minimize the number of jumps the user makes in case you rename the same thing multiple times. It updates all the old redirects to point to the latest target.

The final URL that gets output to the frontend from a ResourceLocation is the ExternalRoute combined with the current hostname and protocol (eg. "https") in use based on the request that came in.

Product URLs

Read how product urls are generated here.

Product Category URLs

Read how product category urls are generated here.

CMS URLs

The URLs for CMS articles are syncronized from Bizzkit CMS by the recurring job UpdateCmsRoutingJob. These URLs can be anything the CMS user wants as long as the URL is not already in use.

To let the CMS know which URLs are already taken there is another recurring job called ProtectRoutesInCmsJob that uploads all the existing URLs that do not belong to the CMS-area to the CMS.

Static pages

Static pages are pages on the website that do not point to a specific entity. Instead it is pages like the basket page, the checkout page, the login page or the search result page. All the pages under "My pages" are also static pages.

You can configure the URL each of these should have in the administration UI under Website > Settings > Static pages.

Next to that under Website > Settings > CMS pages you can also select the CMS pages that should be used as frontpage, 404 page and error 500 page respectively. These have hardcoded URLs, but it is good to know where to configure their contents.