webCOMAND

Single-Page Publication Tutorial

This tutorial builds on the Content Types Tutorial to create a Publication that will publish the president database to a single-page website.

Watch the video above, or follow the step-by-step instructions below.

Create "Presidents" Publication List

We are going to create a website that lists the presidents in our presidents database.  So, first we will create a Publication List, which will be used to list the presidents.

  1. Click "Tutorials" in the folder tree in left panel.
  2. Click the New Menu (New Menu) in the right panel's toolbar.
  3. Select "Publication List" from the list of content types.
  4. Enter the Identifier "Presidents".
  5. Select the Content Type "President".
  6. Select the Content Source "Publication's Content Folder".
  7. A Filter is not necessary because we want to include all presidents.
  8. An Order/Limit is not necessary because we want the default sort order (by the numeric and text fields with "Show in Summary" checked, which is Number and Name in this case).
  9. Click Approve.

The new Publication List will appear under Tutorials in the left panel.

Create "Presidents" Publication Procedure

Now that we have a list of the presidents we want to publish, we can create a Publication Procedure, which will specify how to publish them to a web page.

  1. Click "Tutorials" in the folder tree in left panel.
  2. Click the New Menu (New Menu) in the right panel's toolbar.
  3. Select "Publication Procedure" from the list of content types.
  4. Enter the Identifier "Presidents".
  5. Enter the Filename "index.html", since this will serve as the home page of our new website.
  6. Enter the Script:
    <html>
    <head>
        <title>Presidents</title>
    </head>
    <body>
        <h1>Presidents</h1>
        <ol>
    #LIST(Presidents)
            <li value="$Number">$Name</li>
    #ENDLIST
        </ol>
    </body>
    </html>
    
  7. Click Approve.

Create "Presidents" Publication

Now that we have a Publication Procedure to produce the web page, we need a Publication to publish it to a specific location.

  1. Click "Tutorials" in the folder tree in left panel.
  2. Click the New Menu (New Menu) in the right panel's toolbar.
  3. Select "Publication" from the list of content types.
  4. Enter the Title "Presidents".
  5. Select Content Folder "Tutorials," as well as the "Presidents" base.
  6. Select Publication Procedure: "Presidents".
  7. Check Active.
  8. Click the Destination tab.
  9. Enter Publish Path "live.<account>.webcomand.com/htdocs/" where <account> is the name of your webCOMAND account, as it appears in the URL.
  10. Click Approve.

Publish "Presidents" Publication

Now that the Publication has been created, we can publish it.

  1. Click the icon in the Title Bar to refresh the Publication's Form View
  2. Click the green Publish button at the top.  The Notifications Side Bar will slide out from the right to display information about the publish process, including a link to files published as they are completed.  In this case, just our one web page file will be published and the link should be displayed.
  3. Click the index.html link to open the published web page in a new browser tab.

The web page should include all of the presidents in the database.