KB Version:

Learning Levels

Most Read

Announcements RSS Feed of Announcements

Set up PDF, Printer Friendly, and XML Configurations

With the simple demo site integrated, you can take advantage of more system functionality and set up a PDF, printer friendly, and XML version of the pages.

setup configurations chart

A. Create a PDF Template

The first template you will create is for PDF generation.

To set up the PDF template:

  1. Be sure you are still in the web site context. If not, select web from the top sites menu.
  2. Go to the Home area, and browse to your templates folder. In our case, we will use templates.
  3. Click New -> Default -> Template in the top navigation menu.
  4. For the XML field, please type the following:
  5. In versions 6.7 and later, enter pdf for the Sytem Name field at the top of the screen.  In versions previous to 6.7, select the System pane. For the System Name field, enter pdf.
  6. Select the Regions pane. For the XSLT Format field, click the browse icon and select [site: _common]/formats/output/xhtml2fo2pdf. For this example PDF template, you’re actually just producing HTML and having the HTML converted to XSL:FO and then transformed into PDF. You can generate PDFs directly from XML without going through HTML, but for the purposes of this example, it is easier to first use HTML. Please see Google for more information about XSL:FO and the powerful capabilities it provides.
  7. Click the Submit button to save the new template.

B. Create a Printer Friendly Template

With the PDF template in place, you need to create the printer friendly template.

To create the printer friendly template:
  1. Browse to the templates folder for the site, templates.
  2. Select New -> Default -> Template from the top navigation menu.
  3. For the XML field, type:
  4. Now select the System pane. For the Name field, type printer friendly.
  5. Click the Submit button to save the template.

Now with the PDF and printer friendly templates in place, you need to create the final XML template.

C. Create an XML Template

To create an XML template:
  1. Select the templates folder for the specific site. In our case, we will select templates.
  2. Click on New -> Default -> Template in the top navigation menu.
  3. For the XML field, type:
  4. Now select the System pane. For the System Name field, type xml.
  5. Click the Submit button to save the new template.

With the three templates in place, you only need to add the templates to the page configuration set to see the new content formats.

D. Attach Templates to a Configuration Set

To add new configurations to a configuration set:
  1. Go to the Administration area, and select Configuration Sets from the left navigation bar.
  2. Select the specific configuration set for the site. In our case, we will choose the Web Standard configuration set.
  3. Click the Edit tab, and select the Configurations pane.
  4. Scroll down past the default configuration to the section labeled Add.
  5. For the Template field, click on the browse icon to choose your new PDF template. In our case, we will choose templates/pdf.
  6. For the Name field, type PDF.

    attach template

  7. Click Add this new configuration.
  8. You will be forwarded to the properties for the new configuration (located under the Configurations pane, in the Edit tab), which includes the regions it has inherited from the template.
  9. For the Output File Extension field, type .pdf.
  10. For the Type of Data field, select PDF from the drop down.
  11. Click Submit to save the changes.

    pdf config pane

  12. Repeat this process two more times creating the Printer Friendly and XML configurations with corresponding templates. (set the Output File Extension field for Printer Friendly to -lite.html and .xml for the XML configuration.)
With the configuration set updated, you can go to your pages and preview the repurposed content for the new output formats. Your final task is to make the different page formats available as links on the standard HTML configuration.

E. Configuration Hyperlinks from a Template

When a page has multiple configurations, you need a way to navigate between them. A simple system-page-output attribute can be placed inside of conventional HTML anchor tags to enable end users to switch between different configurations for a page via standard hyperlinks. These hyperlinks will be accessible both within the system and on published page(s).

To link other configurations within a configuration set from a template (or any other XML/XHTML):

  1. Go to the Home area, and browse to the standard HTML template used for the pages. In our case, we will select templates/standard.
  2. Click the Edit tab.
  3. Create a standard HTML anchor tag without any attributes for your desired configuration. In order for the system to find the desired configuration, supply the system-page-output attribute with the name of the output to which you want to link. After the tag in the XML field, find the place you want the links to appear and insert the following code:

    This code represents three link tags, each with a special system attribute that points to a unique target used by the chosen configuration set. The system will automatically remove this attribute and insert a correct href attribute in its place. The value of the attribute is the name of the configuartion. The special system-page-output attribute is only valid for page configurations that are contained within the same configuration set (i.e. an XML configuration from another configuration set has to be linked in a different manner).
    Note: If you don’t know where the code should go, just put it after the opening tag. Additionally, these link values can also go into a block or format in a template region so that only certain pages make them available (e.g. press releases).

  4. Click the Submit button to save the template.

Now, your pages are ready to go with links to the available formats.

printer friendly example

Videos