-
Notifications
You must be signed in to change notification settings - Fork 3
Basic Usage
akaspick edited this page Oct 27, 2010
·
9 revisions
Creating a basic page.
- Navigate to the /cms path in your browser
- Create a new page. This first page will be our layout file. Use the {{ content_for_layout }} variable for the spot that inner content will be inserted.
- Create a second page called home_page. This page will contain some basic content.
- Select the first page we created as the layout file for this page. To make the page publicly viewable, select the publish checkbox and since this will be our home page (makes the site accessible at the / path) also check the home page link.
- Clicking on the magnifying glass beside home_page will render the page at it’s public url. You can see the page at the /home_page url.
- Since we checked the home page checkbox when creating this page, we can also view the page at the / (root) url.
- We’ll upload an image now.
- It can be seen in the asset list on the left.
- Editing the home_page page, we insert some liquid markup using two built-in filters… asset_url and image_tag. This markup will insert our image asset into the page.
- Re-viewing the page, we can see our image renders within the page.