How do you remove the start page

46 views
Skip to first unread message

fatco...@gmail.com

unread,
Jan 8, 2020, 6:31:15 PM1/8/20
to KalikoCMS Developer Forum
I don't want the pages to be renderded by kaliko. I want to handle them with a web app and to load my own splash page at the root

Fredrik Schultz

unread,
Jan 12, 2020, 8:18:11 AM1/12/20
to KalikoCMS Developer Forum
Currently the start page routing is handled by a HTTP module and cannot be skipped completely (but there's a workaround and a pending change).

What's possible to do as a workaround is to let your home controller inherit from PageController and to bypass the inherited action, like:
    public class HomeController : PageController<StartPage> {
        [NonAction]
        public override ActionResult Index(StartPage currentPage) {
            throw new NotImplementedException();
        }

        public ActionResult Index() {
            return Content("Custom action");
        }
    }

However this isn't ideal, and in the major rewrite of the CMS (.NET Core compatibility etc) that is ongoing there have been a configuration option added to completely bypass the start page. This would be a small thing to add to the current version as well and I'm about to make a small beta release pretty soon where this could be included.

Fredrik Schultz

unread,
Jan 18, 2020, 1:58:04 PM1/18/20
to KalikoCMS Developer Forum
I've published a new pre-release at https://www.nuget.org/packages/KalikoCMS.Core/1.2.6-beta1 which include a new configuration option.

By setting ignoreStartPage to true in the siteSettings element in the web.config all requests to the web application root (/) will bypass the CMS routing logic:

<siteSettings ignoreStartPage="true" .. />

If setting the parameter to false or omitting it from the configuration then the CMS will try to route to the defined start page.

Reply all
Reply to author
Forward
0 new messages