Is there a built in way of doing "catch all" pages?

In the CMS, we have some specific pages (ex. my account) we host more advanced javascript apps that manages state with a “router”. We currently only use “hash”-urls for those javascript routes, but would like to be able to use “history url” instead.

Is there a simple way to make a page a “catch all” page? Meaning that I want it to load at /page but also on /page/abc and /page/dfg etc… I am aware of a way with doing it in the 404 handler-of course, but just wondering if there is something already built in.

Litium version: 6.3.7

Does the permanent redirects solve it?

In Litium 6 it was a feature that was build to dynamic creating the brands pages in accelerator from all the brands that was existing in products, this feature is removed in Litium 7.

You can try the following where you change MyPageTypeName to the name of the page type that you want the catch-all on.

using System.Collections.Generic;
using Litium.Foundation.Modules.CMS.Pages;
using Litium.Foundation.Modules.CMS.Plugins.Routing;
using Litium.Foundation.Modules.CMS.Routing;
using Litium.Owin.InversionOfControl;

namespace Litium.Accelerator
{
    [Plugin("MyPageTypeName")]
    public class PageTypeCatchAll : INamedHandlerRouteResolver
    {
        public bool TryGetHandlerData(PageRequestData pageRequestData, Page page, List<string> segments)
        {
            return true;
        }
    }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.