Hi Magnolia
Hi Magnolia
This absolute beginner’s tutorial is an abridged version of Hello Magnolia, with the functionality limited to the bare minimum required to put together a web page using simple commands and pre-configured components.
You’ll learn what those components are and where to put them to produce this simple web page.
A preview of the finished page.
|
In page edit view, you’d see green component bars.
|
This tutorial is based on version 5 of Magnolia CLI. |
Prerequisites
-
First, you’ll need to get Magnolia if you haven’t installed it already.
What are we going to do?
Tutorial overview
-
We’ll locate the light module folder in the Magnolia installation directory.
-
Then, we’ll add page and component templates in subfolders.
-
Next, we’ll add dialog files in subfolders.
-
Finally, we’ll create a page using the dialogs and templates from the previous steps.
-
๐ You’ll create one folder.
-
๐๐ You’ll create two folders.
-
๐ You’ll add one file into a folder.
-
๐๐ You’ll add two files into a folder.
-
โค You’ll need to download one file.
-
โคโค You’ll need to download two files.
Setting up templates and dialogs
Steps and explanations | Folders and files | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
The default root folder structure after installation with Magnolia CLI v5 is below.
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
Creating a page with dialogs based on templates
-
Start up your Magnolia instance.
-
Log in and open the Pages app.
-
Create the page that is displayed at the beginning of this tutorial:
-
Click Add page in the Action bar on the right.
-
In the Add page dialog, call the page Hello World, choose the hi-magnolia template for it, and click Next:
-
In the My first Magnolia page dialog, enter also Hello World in the Page name field and click Save changes.
-
Click Edit page in the Action bar on the right.
-
Start adding components to the page. Click the plus button in the New Main Component bar.
-
In the Add component dialog, select the Title option and hit Next.
-
In the Title dialog, write "My first title in Magnolia" and click Save changes.
-
-
Click the New Main Component plus button again.
-
In the Add component dialog, select the Paragraph option and press Next.
-
In the Paragraph dialog, write "This is my first sentence in Magnolia." and click Save changes.
-
-