Creating your first site and content page
In Creating your first asset you learned why content areas are important for grouping assets relating to a website you are building, and how you create assets.
With this concept in mind, you can begin to build a website structure below this folder. Once you have created your website structure you can preview the site on the frontend.
About content asset types
There are many content asset types you can select from in Matrix.
The most common asset you use to build websites with is the "standard page". As the name suggests, this asset type specializes in helping you build regular web pages on a website.
Content assets usually live under a Site asset which controls the URL of your site. This gives your content pages a browseable address on the frontend using their own individual URLs.
In this getting started section, you’ll learn how to create your first website with a homepage and some custom content.
Create a site asset
Start by creating a site to contain your web pages.
Create a site asset under the folder you created in Creating your first asset.
-
Right-click on the "My first website" Folder asset.
-
Select
. -
Name the asset "My website".
-
Select Menu link from the Link type options.
-
Select Save.
Set a URL for your site
Set the URL for the site asset to allow website users to browse to its location.
-
Navigate to the URLs screen of your new site asset.
-
Add a URL available to your Matrix system.
-
Select Edit to enable the URLs field for editing.
-
Specify a URL that is available to your Matrix system. If your system is available from
www.example.com
a valid URL iswww.example.com/my-website
. -
Select the HTTPS checkbox.
HTTPS is the recommended option to give your site stronger security. -
-
Select Save to set the site URL.
You can now create a standard page under your Site asset from which you source the home page content.
Create a standard page asset
Create a standard page under the site asset you created in the previous section.
-
Right-click on the Site asset and select
. -
Name the page
Home
and set Link type to Hidden link so it is not included in your main menu. -
Select Save.
You can now begin adding content to the page.
Add content to the page
The Content screen of the standard page asset is where you typically create the content that displays on the frontend. Add some content to the page, so you have something to display.
-
Switch to the Content screen.
-
In the WYSIWYG component, type a sentence to display on your page.
-
Select Save.
You can continue making further changes while you hold the page locks. You no longer have the page locks if you see the Edit button display on the screen you are editing. |
Set your page as the index page
Every site needs a “home” or “index” asset to source its homepage content from.
Set your newly created page as the index page of the Site asset you created previously.
-
Go to the Details screen of the "My website" Site asset.
-
Select Edit.
-
Find the Index page field and select Select asset.
-
Right-click on your Home standard page asset in the tree and click Use Me.
If you prefer you can also type in the asset ID into the Index page field. |
-
Select Save.
Preview the results
You can now view your basic website by accessing the URL you set in Set a URL for your site.
-
Select Preview to load the preview screen.
-
Click the link in the Preview URL to load the site in a new window.
Next steps
Your website is browseable, but it is still unpublished and unavailable to users. To allow users to view your site, you need to publish your site by setting its status to Live. Read Publishing your site to learn more about publishing and viewing your site.