Let's create a page for a web form where users can log a new ticket.
Step 2.1 - Create new-ticket.yaml
Create a new YAML file in the project directory (the same directory as the lowdefy.yaml
file) called new-ticket.yaml
, with the following content:
id: new-ticket
type: PageHeaderMenu
properties:
title: New ticket # The title in the browser tab.
layout:
contentJustify: center # Center the contents of the page.
blocks:
- id: content_card
type: Card
layout:
size: 800 # Set the size of the card so it does not fill the full screen.
contentGutter: 16 # Make a 16px gap between all blocks in this card.
blocks:
- id: page_heading
type: Title
properties:
content: Log a ticket # Change the title on the page.
level: 3 # Make the title a little smaller (an html `<h3>`).
Step 2.2 - Update lowdefy.yaml
Change the lowdefy.yaml
to look like this:
name: lowdefy-project-template
lowdefy: 3.15.0
pages:
################ -------- Copy from here -------- ################
- _ref: new-ticket.yaml
################ -------- Copy to here ---------- ################
- id: welcome
type: PageHeaderMenu
properties:
title: Welcome
# ...
YAML files use indentation to determine the data structure represented. If you are having any problems, make sure the indentation is the same as in the instructions.
Step 2.3 - Navigate to the new page
Your browser should reload, and you should see a link in the header menu to the booking page. If you click on that link it should take you to a page that looks like this: