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.
- Click "Tutorials" in the folder tree in left panel.
- Click the New Menu () in the right panel's toolbar.
- Select "Publication List" from the list of content types.
- Enter the Identifier "Presidents".
- Select the Content Type "President".
- Select the Content Source "Publication's Content Folder".
- A Filter is not necessary because we want to include all presidents.
- 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).
- 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.
- Click "Tutorials" in the folder tree in left panel.
- Click the New Menu () in the right panel's toolbar.
- Select "Publication Procedure" from the list of content types.
- Enter the Identifier "Presidents".
- Enter the Filename "index.html", since this will serve as the home page of our new website.
- 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>
- 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.
- Click "Tutorials" in the folder tree in left panel.
- Click the New Menu () in the right panel's toolbar.
- Select "Publication" from the list of content types.
- Enter the Title "Presidents".
- Select Content Folder "Tutorials," as well as the "Presidents" base.
- Select Publication Procedure: "Presidents".
- Check Active.
- Click the Destination tab.
- Enter Publish Path "live.<account>.webcomand.com/htdocs/" where <account> is the name of your webCOMAND account, as it appears in the URL.
- Click Approve.
Publish "Presidents" Publication
Now that the Publication has been created, we can publish it.
- Click the icon in the Title Bar to refresh the Publication's Form View
- 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.
- 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.