Gamma Theme - Pages not on display

Hi,

I am using the Gamma Theme. The problem is, that i can not add an additional page to my website. For example I wuld like to add a contact page, but it redirects right to the error page. Did I install something wrong or do I have to manually change some .php file?

Since that is a commercial theme, it is difficult to help without being able to see the code. From the themes description, it is designed to be just a single page listing external links. Are you familiar with how Kirby works? I suspect that it is missing a template/blueprint and potentially a controller for additional pages.

For help relating to templates, you can read the documentation here, and for help with setting up a new blueprint, there is help here.

If your contact page needs to contain a form, I would recommend using the Uniform plugin, but you can also roll your own.

1 Like

Thank you very much, I will look into that.

@mdm_stranger How did you add the additional page, via the file system or via the Panel?

If you can’t add a page via the Panel, check out the /site/blueprints/site.yml blueprint to see if it allows the creation of new pages.

If you could add the new page, check the /site/config/config.phpfile, if there is a route that redirects all pages to the error page or if there is a template in /site/templates that contains some redirection code.

1 Like

I added it via the panel.
In /site/templates the default.php just says

<?php go(url('error')) ?>

The config.php says

<?php

/*

---------------------------------------
License Setup
---------------------------------------

Please add your license key, which you've received
via email after purchasing Kirby on http://getkirby.com/buy

It is not permitted to run a public website without a
valid license key. Please read the End User License Agreement
for more information: http://getkirby.com/license

*/

c::set('license', 'MY-PERSONAL-KEY');

/*

---------------------------------------
Kirby Configuration
---------------------------------------

By default you don't have to configure anything to
make Kirby work. For more fine-grained configuration
of the system, please check out http://getkirby.com/docs/advanced/options

*/

c::set('debug',false);

/* 

---------------------------------------
Homepage Setup
---------------------------------------

By default the folder/uri for your homepage is "home".
Sometimes it makes sense to change that to make your blog
your homepage for example. Just change it here in that case.

*/

c::set('home', 'about');

I am not that good at PHP, but should the PHP-Tag look like this in the config.php?

The config.php looks ok, the home page is set to the about folder.

But the default.php template redirects to the error page, so whenever you create a new page that doesn’t have its own template, you will be redirected to the error page.

You can prevent that by creating a template for your contact page and make sure that the content txt file in your contact folder has the same name as that template, e.g. contact.txt and contact.php.

1 Like

Thank you for the help. I just used the default.php from the Kirby Starterkit which works fine for me.