I’m new to KirbyCMS and I have a question that might sound a bit tricky for me to explain.
I want to build a one pager website, in this website, I also want that the editor of the page be shown directly at the root.
For the sake of clarity, let’s say I want to build a restaurant one pager like in the demo: demokit/restaurant.yml at main · getkirby/demokit · GitHub
How can set up this very page at the root of the panel (
site.yml) and be able to render the content in a template?
I’ve tried to create a
site.php template but that did not work out.
I hope I’m clear enough.
There is no such thing as a
site page. All pages are created as subfolders of the
/content folder. The page that is shown as the start page is always
What you could do, however, is set the content up in
site.yml so that it gets stored in
site.txt, but still render it using the home.php template. Instead of using
$page in your home template, you would then use
$site to retrieve the fields from
Hello @texnixe ,
Thanks for your swift answer. I’m glad that your telling me this because it is already what I was doing.
However in order to render
site.txt in the home template, I will still need to create a
home folder with text file in it in content. Am I correct?
The home folder (and the error folder) (or a differently named folder set as home folder in config) is required by Kirby, if you remove it, you’ll get an error.
The same is true for the
default.php template, which is also required and may not be removed.