How to: Create a contact page

Hello there again, based on my questions you might know that I am fairly new to kirby. Trying to follow tutorials, but they are not very clear to me.

I am following this tutorial.

Here I am right now.

  1. Created the template under site/templates/contact.php
    copy paste the code… follow the next step for controllers etc.

Then I navigate to localhost:9000/contact
→ This page cannot be found :scream:

What I am I missing?

I surely can add a new page via the panel, named contact, refreshing the url, shows an empty page. → where is the contact form I have added in the site/templates/contact.php

All very confusing so far. Thank for the help.

When you create a page via the panel, it has by default the default template.

I surely can add a new page via the panel, named contact

Contact is just a title, not the actual template. So you have the contact template, but you do not have any page based on it yet.

The recipe assumes that you create the page in the filesystem manually.

If you create the page via the Panel, you have to make sure that you select the contact template in the page creation dialog.

This in turn requires that you have a pages section that allows you to create pages with this template.

In the Starterkit, when you open the dashboard, you see three pages sections (Photography, Notes and Pages). If you look at the site.yml blueprint, you will notice that the Pages section looks like this:

          pages:
            type: pages
            create: default
            templates:
              - about
              - home
              - default

That means, you can only create new pages using the default template. Remove the line that says create: default and add the contact template to the list of templates.

Note: It might make sense to familiarize yourself with the basics first before venturing on more advanced stuff.