# How to get rid of "homePage"?

**URL:** <https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375>\
**Category:** Questions\
**Created:** [August 25, 2023, 1:32pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375 "2023-08-25T13:32:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 1:32pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/1 "2023-08-25T13:32:46Z")

</div>

My site does not have a homepage. Currently Kirby requires me to set a homepage (default ‘home’ if nothing else has been set). As i don’t have a page with a `home` slug, there is an Exception that the Homepage is not found.

What can i do to learn kirby to not require one particular page to be something like a homepage?

What I want to achieve is that as long as no page has been called, an overview page with a main navigation is displayed. On the overview page all listed pages should be displayed equally. None of these pages is the homepage. Within these pages you can navigate back and forth only via a breadcrumb navigation. On the top level all listed pages should be displayed equally.

At present there are unfortunately only problems with it, because Kirby hard-coded always requires a homepage.

---

<div class="post-metadata">

**Author:** ![stffr](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@stffr](https://forum.getkirby.com/u/stffr)\
**Post date:** [August 25, 2023, 1:44pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/2 "2023-08-25T13:44:51Z")

</div>

I’m not sure I understand it correctly, but why can’t you set your “page which should be called if no other page is called” as your homepage?

---

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 1:58pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/3 "2023-08-25T13:58:17Z")

</div>

Because there is no other page.

The `listed`-Pages all are subpages for the site planned. None of them can be called as a homepage.

If no particular page is called, there only should be a page with a main navigation listing all the `listed`-pages of the site.

I hope that makes it clear.

Despite of that the site is empty on default, that means that there is no page with the `home`-Slug, what results in an exception. As soon as the first page has been created, there is a page but this page does not necessarily have to be called “home”, it can have any URL. But you don’t know that URL before (to configure it as `home` in `config.php`.  
Additionally the order of the pages can change, so you can’t declare any of the listed pages as “home”. They are all equally, not home.

---

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 2:20pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/4 "2023-08-25T14:20:19Z")

</div>

Imagine something like a knowledge base:

Each page you set up should be a category under which knowledge articles can be published.

So you want to display a list of all categories (pages) on your start page.

And that’s where the problems start, because Kirby expects one of the pages to be called `home`. But `home` does not exist as a category or page. And now?

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [August 25, 2023, 2:29pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/5 "2023-08-25T14:29:41Z")

</div>

Well, you need a start page, no matter what you call it. You could set `home` to the first page in the list of pages or something like that. But in any case, at least one page needs to exist.

---

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 2:36pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/6 "2023-08-25T14:36:56Z")

</div>

As soon as one page is created by the later user, there is a page - of course.

But it doesn’t need to be called `home`. Thats why there is still an exception ☹

What i managed to do so far is when instantiating the Kirby App i set the `home` configuration setting automatically to the first listed page (the directory name of 1\_xxxx in the content folder). I consider this to be a dirty hack.

The problem with that is, that kirby removes the path from the URL. So when you try to use page.url in the template, it breaks.

It is really not mandatory that any page be named `home`.

At first glance, it may seem that you always have to have a page called `home`. But if you think a little further, you will realize that the constraint does not have to be.

Kirby will of course work if you remove this constraint smartly.

---

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 2:39pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/7 "2023-08-25T14:39:30Z")

</div>

Kirby’s current approach assumes that one of the content pages is also the home page.

But this is not the case in my application.

All the top-level pages are pages, but none of them is the home page. There should be a prefixed navigation from which you can jump to the individual pages. And exactly this is unfortunately not possible at the moment because of the forced `home` page, because Kirby always assumes this entry page as one of the content pages.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [August 25, 2023, 4:09pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/8 "2023-08-25T16:09:25Z")

</div>

What you can do, is create a virtual page via the `pages` extension and then set the `home` option page to this virtual page, which could then contain the navigation for your site.

But I don’t quite get why it matters, if you have a home page or whatever it is called, you will have to have an entry point to your site, from where all other pages are navigable, no? Or what is a

> [@andio](#):
>
> prefixed navigation f

?

```auto
<?php

use Kirby\Cms\Page;

Kirby::plugin('my/plugin', [
	'pageModels' => [
		'virtual' => 'VirtualPage'
	],
	'pages' => [
		'_' => new Page([
			'slug' => '_',
			'template' => 'default',
			'content' => [
				'title' => 'Navigation'
			]
		])
	]
]);

```

```auto
    'ready' => function() {
		return [
			'home' => '_'
		];
    },

```

---

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 4:17pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/9 "2023-08-25T16:17:21Z")

</div>

First of all, thank you for replying to me in this thread. That makes me feel much better 🙂

In this particular case, I don’t want the homepage to be one of the `listed()` pages. Because when the site is first called, I don’t want any of the pages configured in the panel to be displayed yet, only navigation items for each `listed` page at the top level.

I think I could accomplish what I have in mind if I put all the pages as subpages under a parent page. Then I could form a navigation in the parent page with each child page. But that would have the disadvantage of adding a superfluous layer in the panel. What I am trying to achieve is that I can create a parent navigation (of all `listed` pages) in the template if no page was selected (i.e. the / path was called). After that you should be able to call the respective pages normally.

---

<div class="post-metadata">

**Author:** ![andio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andio/32/9117_2.png) [@andio](https://forum.getkirby.com/u/andio)\
**Post date:** [August 25, 2023, 4:24pm UTC](https://forum.getkirby.com/t/how-to-get-rid-of-homepage/29375/10 "2023-08-25T16:24:31Z")

</div>

**Thank you so much for this tip!**

This was exactly the solution I needed. And it shows once again the incredible flexibility Kirby offers users. Although it is the simplest CMS in the world, you can do incredibly individual things with it.
