We have created a Template file and associated it with a Rules file in the previous chapters. What now remains is the creation of a Presentation file (XSL) to format the data in the content file into a suitable rendition such as HTML, WML, etc. The website pages are nothing but the web renditions of content XML files via Web Publisher presentation files and so the design and creation of Presentation files is crucial in a web content management project.
Additionally, Presentation files separate the structure of content from its layout. While the templates and Rules files simply capture the structure of the content to be entered by content authors, the Presentation files focus on how the entered content is formatted for generating web renditions.
A rendition is created by Documentum whenever a content file is saved and checked into the Docbase. Behind the scenes, Web Publisher applies the Presentation file (XSL stylesheet) to the content XML file and generates the prescribed rendition. Presentation files in Web Publisher are of two kinds:
<body></body>
elements of HTML content files.Creating Presentation files in Documentum is not a big deal and the following steps explain how they can be easily built and associated with template files.
cust_news_art_pres.xsl
for the News Article template). Save the newly created Presentation file within a convenient folder location on your machine's hard drive.Figures 15.3 and 15.4 show a sample presentation file for the News Article template. Note that you could improve it (and there definitely is enough scope for improvement!) as per your specific business requirements.
Note carefully how the various template file XML elements have been formatted in the XSL stylesheet. It may be worthwhile to flip over to Chapter 13 and keep the template XML file beside you while studying the above Presentation file.
/Site Manager/Presentations/Editor/Custom_Presentations
.Now that you have created and imported the Presentation file in Docbase, you need to associate it with the news article Template file we created in chapter 13. However, understand that associating a Presentation file with a Template file requires specifying a rendition format for the output of Web Publisher.
Rendition formats could be default Documentum recognized formats such as html
(standard HTML format) or crtext
(text format), or custom formats identified for one's business needs. If you require that our Presentation file should style the News Article content file and create a rendition format of the MIME type html
but with some customfile extension (say .cshtml
), then this is what you need to do:
Log in to Documentum Administrator as an administrator user and go to Administration | Formats.
Choose the menu option File | New | Format and provide the details of the new format as shown in figure 15.7. The details are:
Name: custom_format
Default File Extension: cshtml
Description: Custom format
Mime Type: Text/html
Do not forget to include the custom format within your Site Publishing configuration against the Formats field in the Content Selection Settings section. This ensures that the renditions generated in custom formats are published out from Docbase during publishing operations. More about this in Chapter 21.
You have an option to specify the chosen rendition format for all content that will be created going forward from the template in question, as well as for content created from the template and already existing in Docbase.
Click on OK and finally Close to complete associating the Presentation file with the Template file.
3.147.36.61