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. First, you need to set up the publishing targets. New targets are needed to specify a new type of page output. The target used in the previous two technical documents was an HTML target, and the pages associated used a HTML output. Now, you need to setup targets that have different output types.

A. Create a PDF Target
To set up a PDF target:- Go to the Administration area, and select Targets & Destinations from the left navigation bar.
- Click on the web target, and then click New Target.
- For the Name field, type pdf.
- For the Base Folder field, select the top-level folder of the specific site being managed. In our case, we will use /web.
- For the Output File Extension field, type .pdf.
- For the Type of Data field, select PDF from the drop down.
- For the Internal Links option, check the box for Include Target Path. This field lets the system know that the path of the target should be part of the publishing output folder and that the links should have this path taken into account.
- Click Submit to save the new target.

Now with the new target in place, you need to set up a destination to have the PDF content published.
To set up a destination:
- Click on the new target located in the asset tree. In our case, we will select /web/pdf.
- Click New Destination.
- For the Name field, type in Local.
- For the Transport field, select an existing transport. We will select Filesystem followed by Server Hard Drive.
- Select all groups in the Applicable for Groups field, and click the green arrow to have the selected items moved to the box on the right.
- Now click the Submit button to save the new destination.

B. Create a Printer Friendly Target
With the PDF target and destination in place, you can up a similar set for printer friendly.To set up a printer friendly target:
- While still in the Administration area under Targets & Destinations, click on the web target, and then click New Target.
- For the Name field, type printer.
- For the Base Folder field, select the browse icon and choose the main asset folder for the site. In our case, we will select /web.
- For the Output File Extension field, type in .html.
- Check the Internal Links box for Include Target Path.
- Click the Submit button to save the new target.
Now set up a new local destination for the printer target in the same way it was completed previously for the pdf target. With a printer friendly target and destination in place, you can set up the final XML target.
C. Create an XML Target
To set up an XML target:
- While still in the Administration area under Targets & Destinations, click on the web target, and then click New Target.
- For the Name field, type xml.
- For the Base Folder field, click the browse icon, and select the main asset folder for the site. In our case, we will select /web.
- For the Output File Extension field, type .xml.
- For the Type of Data field, select XML from the drop down.
- Check the Include Target Path box for Internal Links.
- Click the Submit button to save the target.
Now set up a new local destination for the xml target in the same way it was completed previously for the pdf target.
D. Create a PDF Template
With the three targets in place, you are ready to set up the new templates. The first template you will create is for PDF generation.To set up the PDF template:
- Go to the Home area, and browse to your templates folder. In our case, we will use /web/templates.
- Click New -> Default -> Template in the top navigation menu.
- For the XML field, please type the following:
- Check the box Convert HTML to XHTML. This automatically creates XHTML blocks for the PDF-HEADER and PDF-FOOTER regions and adds additional fields in the portion of the template.
- Now select the System pane. For the System Name field, enter pdf.
- For the Target field, select your new PDF target. In our case, we will select /web/pdf.
- Now select the Regions pane. For the Stylesheet field, click the browse icon and select /common/stylesheets/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.
- Click the Submit button to save the new template.

E. Create a Printer Friendly Template
With the PDF template in place, you need to create the printer friendly template.

- Browse to the templates folder for the site, /web/templates.
- Select New -> Default -> Template from the top navigation menu.
- For the XML field, type:
- Check the box that says Convert HTML to template XHTML.
- Now select the System pane. For the Name field, type printer.
- For the Target field, select the new printer friendly target created earlier. In our case, we will select /web/printer.
- 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.
F. Create an XML Template
To create an XML template:- Select the templates folder for the specific site. In our case, we will select /web/templates.
- Click on New -> Default -> Template in the top navigation menu.
- For the XML field, type:
- Now select the System pane. For the System Name field, type xml.
- For the Target field, choose your XML target created previously. In our case, we will choose /web/xml.
- Now click the Submit button to save the new template.
With the three templates and targets in place, you only need to add the templates to the page configuration set to see the new content formats.
G. Attach Templates to a Configuration Set
To add new configurations to a configuration set:- Go to the Administration area, and select Configuration Sets from the left navigation bar.
- Select the specific configuration set for the site. In our case, we will choose the Web Standard configuration set.
- Click the Edit tab, and select the Configurations pane.
- Scroll down past the default configuration to the section labeled Add.
- For the Template field, click on the browse icon to choose your new PDF template. In our case, we will choose /web/templates/pdf.
- For the Name field, type PDF.
- Click Add this new configuration.
- 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. Click Submit to save the changes.
- Repeat this process two more times creating the Printer Friendly and XML configurations with corresponding templates.

H. 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):
- Go to the Home area, and browse to the standard HTML template used for the pages. In our case, we will select /web/templates/standard.
- Click the Edit tab.
- Create a standard HTML anchor tag without any attributes for your desired configuration. In order for the system to find the desired configuration, use the system-page-output attribute with the name of your target matching the target used in the designated configuration. 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 target and should not be confused with the name of the particular configuration. In the “XML” output, even though the configuration is named “XML,” the system looks for the unique name of the target, which has also been named “xml.” 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 stylesheet in a template region so that only certain pages make them available (e.g. press releases). - Click the Submit button to save the template.
Now, your pages are ready to go with links to the available formats.
