Your first page
Last updated
Last updated
Creating your first page is a great start to getting to know the CMS capabilities. It will guide you through the process of creating templates, views, and blocks.
When a page is requested, the CMS will go through this flow:
See if that page exists and is eligible to be shown
Then render the view associated with the page
The view in turn renders the blocks and the blocks are rendered in places determined by the template
From this short description, you can deduce that the basis for our page is the template, so let's create a template. Click on Templates
in the menu and click Create
. Input first_template
in the Code
field and the following to the Source
field:
The internal description field is used for your internal usage to better identify templates later on. Here is a screenshot of what you should have now:
Last, but not least, hit Create
.
Next up is creating the blocks we want to appear in the content
section of the template. Go to Blocks
and click Create
. Input first_block
in the Code
field and add your content to the content fields. You should end up with something like this:
Hit Create
.
Now we have to tie the blocks to the section we defined in the template. We do this in a view. Click on Views
and then Create
.
Now, in the Code
your input first_view
and for the template you choose first_template
. When you select the template the available sections for the template appears on the right. Now you select first_block
and you should have something like the following image:
Remember to hit Create
Last step! We will now create our page. Go to Pages
and click Create
. Input first_page
in the Code
field and select the view we just created, namely first_view
, and input first-page
in the Slug
field. Again, here is an image showing what it could look like:
Click Create
.
You're done! Go to /en_US/first-page
to see your new page!