Skip to content
marcjeanson edited this page Jan 27, 2012 · 9 revisions

Creating a basic page.

  • Navigate to the /cms path in your browser
    This is step1
  • 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.
    This is step 2
  • Create a second page called home_page. This page will contain some basic content.
    This is step 3
  • 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.
    This is step 4
  • 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.
    This is step 5
  • Since we checked the home page checkbox when creating this page, we can also view the page at the / (root) url.
    This is step 6
  • We’ll upload an image now.
    This is step 7
  • It can be seen in the asset list on the left.
    This is step 8
  • 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.
    This is step 9
  • Re-viewing the page, we can see our image renders within the page.
    This is step10

Components

We didn’t demo components here, but they simply allow you to upload a collection of files as one zipped component that you may want to use in your website.

For example, you may want to use a jQuery plugin that is made up of various scripts, styles and images. Instead of going through the painful process of uploading each file separately as an asset, you can upload a single zip file and then reference each file using the component_url liquid tag (see the cms liquid docs from within the app for more details).

Clone this wiki locally