Publishing Content
III. Publish ContentNow that you have your first site and page created, you want to publish it out and see the resulting file. Publishing takes place from a combination of the target, template, destination, and transport; and it allows for simultaneously publishing content to multiple servers.
A. Create a Transport
The first task you need to do is set up a publishing transport. Transports are the mechanisms that move content from a temporary directory on the server to the final location. Transports can push content out via FTP/SFTP or through a type of file system like a VPN, mapped network drive, shared drive, or mounted drive.
To create a transport:
- Click on Administration in the top navigation menu.
- Click on Transports in the left navigation bar.
- Click New Transport.
- For Transport Type, select the Filesystem radio button and then click Submit.
- For the Transport Name, type in Server Output.
- For the Server Directory, type in c:\temp.
- Now click the Submit button to save the new transport.
B. Create a Destination
With the transport in place, you need to set up a publishing destination for content using a specific template to be written out as a file. Destinations allow the use of the same transport across multiple targets. The destination points the assets that are associated with its target to a particular location, which is defined by a transport. Targets can contain multiple destinations and templates.
To create a Destination:
- Click on Administration in the top navigation menu.
- Click on Targets & Destinations in the left navigation bar.
- Select the web target.
- Click New Destination.
- While under the General pane, set the Name value to Local Server.
- The Directory field can be left blank because it will inherit this value from the transport. Optionally, if you wanted to overwrite the Directory, you could put in an absolute path here and have the content directed to a different folder.
- Select a Transport by clicking the browse icon, navigating to Filesystem / Server Output, and then clicking Confirm in the pop up window.
- Now for Activation, check the box for Enable destination, if it isn’t already checked. This checkbox must be checked for the destination to work. It is supplied so that you can have destinations that are created but are turned on or off for various reasons.
- Finally, click Submit to save the new destination.
By associating a target to a template and destination, all of the pages that use this template (by association with a configuration set) now have a display type (HTML, PDF, XML, etc.). Without this association, pages in the system will not render due to the missing output format. Now that the template is associated with the designated target, the destination and the transport are attached to all pages using that template.
- A page cannot be associated with more than one template in the same target.
- A target can have multiple templates and multiple destinations.
- Targets determine output file type, output file extension, and several other parameters.
C. Publish a Page
With everything in order, publish the /web/example page. To publish a page:
- Click on Home in the top navigation menu in order to load the asset interface.
- Navigate to your example page by clicking on web followed by the page example.
- Now, with the page example loaded, click on the Publish tab.
- Click Submit to publish the page. You should see a green message bar saying, “Publish message sent successfully.”
- Now, if you are able to check the local hard drive of the server (not your personal computer), you will see the published example.htm file in the c:\temp\web folder.
You can publish content from five different items in the system, including at the page, file, folder, destination, and target level. Content can be published out as different scripting languages like ASP, ASPX, PHP, CFM, and SHTML.
Pushing out the content as “baked” files provides several benefits, including:
- Production websites are completely independent of the CMS.
- When you upgrade the CMS, the websites continue to run.
- Easier content deployment to multiple servers with built-in publishing framework.
- Web servers support more hits and visitors with baked content.
Additionally, content can be published to external databases and other applications using standard scripting languages.