Please help a newbie to get started!

Hello everybody, I just started using Kirby and I’m still confused regarding certain aspects. I have a limited knowledge of coding and an even more limited knowledge of Kirby, so excuse me if the questions I ask are very banal or difficult to understand.

I am starting to build a simple website (just text and links, a few pages) and I’m encountering, among others, the following problems:

1– the localhost:8888 link doesn’t seem to work: as soon as i change the directory (from “localhost:8888/kirby-project” to, say, “localhost:8888/sonia” the browser shows me this message: “This page is currently offline due to an unexpected error. We are very sorry for the inconvenience and will fix it as soon as possible.” Is there anything wrong with MAMP? It seems to be up and running…

2– i made new folders, but just as for the main page, none of them seems to work. when i click on any of the links i made for the new pages firefox tells me that “The address wasn’t understood. Firefox doesn’t know how to open this address, because one of the following protocols (localhost) isn’t associated with any program or is not allowed in this context. You might need to install other software to open this address.” Which is weird, because the kirby-project works perfectly.

3– i made a .html file for the page and i linked it to the assets/css/index.css file and it works, but only when I open my .html page in the browser, since I can’t access my page via localhost:8888.

More generally: as I understand, I have to start building my website starting from the kirby-project structure. But my website is much more simple than that, and I have the feeling that if I start messing up with the original kirby-project structure it will not work (in fact it isn’t). Could anybody guide me step by step to set up a structure that works?

Thank you in advance,

First of all, please enable debug in your /site/config/config.php file:

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

That should give you a more usable error message. Then please let me know what it says.

Is this of any help?

Error thrown with message “Call to a member function children() on boolean”

#11 Error in /Applications/MAMP/htdocs/sonia/site/snippets/showcase.php:3
#10 require in /Applications/MAMP/htdocs/sonia/kirby/vendor/getkirby/toolkit/lib/tpl.php:22
#9 Tpl:load in /Applications/MAMP/htdocs/sonia/kirby/kirby/component/snippet.php:38
#8 Kirby\Component\Snippet:render in /Applications/MAMP/htdocs/sonia/kirby/helpers.php:12
#7 snippet in /Applications/MAMP/htdocs/sonia/site/templates/home.php:21
#6 require in /Applications/MAMP/htdocs/sonia/kirby/vendor/getkirby/toolkit/lib/tpl.php:22
#5 Tpl:load in /Applications/MAMP/htdocs/sonia/kirby/kirby/component/template.php:103
#4 Kirby\Component\Template:render in /Applications/MAMP/htdocs/sonia/kirby/kirby.php:635
#3 Kirby:template in /Applications/MAMP/htdocs/sonia/kirby/kirby.php:623
#2 Kirby:render in /Applications/MAMP/htdocs/sonia/kirby/kirby/component/response.php:29
#1 Kirby\Component\Response:make in /Applications/MAMP/htdocs/sonia/kirby/kirby.php:705
#0 Kirby:launch in /Applications/MAMP/htdocs/sonia/index.php:16

Looks like you have renamed a folder, so that the project folder with its children does no longer exist. The showcase snippet (/site/snippets/showcase.php) which is called in the home page template (/site/snippets/home.php), expects a page called projects. Remove or uncomment the showcase snippet.

yes, I have renamed the folders according to the structure of my website. So I guess that I have to rename, in the showcase.php, what was once /project according to my new name? Would you be so kind to tell me which part do I have to change in my showcase.php file? Also, I’m attaching a screenshot of my new structure, which folder do I have to use? Thank you!

Well, the question is if the showcase still makes sense with your new folder structure.

In showcase.php on line 3 you can see that $projects is assigned the children of the the projects page page('projects')->children()->visible(); You would have to replace page('projects') with the name of your page that contains the children and images for the showcase. Only makes sense if that page has children and if the children contain images. Otherwise, I’d remove the showcase snippet from the home.php template.

Since you are new to Kirby, may I suggest you read the Getting Started Guide (if you haven’t done it yet) to get a feeling how Kirby works, because it is important to understand the concept of Kirby and how all the different parts play together.