Hi everyone, this is my first time of using kirby, I am stuck on how to get the content file linked to yaml.
here is my content file in .txt
Title: Landed
BannerTitle: The future has landed
BannerText: And there are no hoverboards or flying cars. Just apps. Lots of mother flipping apps.
IntroHead: Odio faucibus ipsum integer consequat
How do I create a Yaml file for this?
bnomei
February 19, 2020, 8:43am
2
hi @John2202 and welcome to the forum.
i guess you are looking for help to create a “page blueprint”. the docs feature a great collection of examples to get you started:
from you content i would say you need the following field types:
You need blueprints for each type of of page .
You then add fields to these blueprints as needed.
The issue is I am totally new to this, I wish i can see sample code on how to fetch each content text to the panel using yaml
The “easiest” method might be to use the page
-preset blueprint: https://getkirby.com/docs/reference/panel/presets/page and add your fields to it:
title:
type: text
bannertitle:
type: text
bannertext:
type: textarea
introhead:
type: text
and go from there.
For more info about fields, check out https://getkirby.com/docs/reference/panel/fields
1 Like
Wow! I appreciate your contribution, I will get it into to Yaml file now.
Now i have issue creating columns
here is my code so far
title: landed
#Preset: page
columns:
main:
width: 2/3
sections:
content:
type: fields
fields:
bannertitle:
type: text
bannertext:
type: textarea
introhead:
type: text
IntroT1:
type: text
introt2:
type: textarea
introt3:
type: textarea
rightsbhead:
type: text
rightsbtext1:
type: text
rightsbtext2:
type: textarea
LeftSBhead:
type: text
LeftSBText1:
type: textarea
LeftSBText2:
type: textarea
texnixe
February 20, 2020, 9:45am
8
I don’t know if it’s just a copy&paste issues, but your indentation is completely messed up. the fields must be indented under type: fields
title: landed
columns:
main:
width: 2/3
sections:
content:
type: fields
fields:
bannertitle:
type: text
# rest of fields
meta:
width: 1/3
sections:
section1:
type: whatever
Thanks for the previous support but i am still stuck on
how to toggle off and on a page section
contact us form.
texnixe
February 23, 2020, 11:03pm
10
John2202:
contact us form.
Check out this recipe: Email contact form | Kirby CMS
This I don’t understand. Could you please explain what exactly you mean?
what i mean by the toggle is that: I have a section of the homepage (HTML) that i want to be switching on/off or enable/disable using the toggle button on the panel but i do not know how to go about it.
I am yet to get the contact form though but i wanna try it on a live server