Plumtree EDK (Enterprise Web Development Kit) 5.4.0 |

# IPresentationTemplateManager Interface

`IPresentationTemplateManager` is an interface for managing `IPresentationTemplate`s. It handles Presentation Template creation, removal, retrieval, and template text validiation.

Modifications to the template text will not be stored permanently until `IPresentationTemplate.Store` is called.

Presentation template text can contain PCS tags that conform to the Content Server Template Language Syntax. PCS tags allow a published content item to contain data that is tied to the content item's values. However, the presentation template text need not contain PCS tags: HTML or plain text is also valid.

PCS tags are formatted like XML elements and begin with the prefix pcs. During publication, Content Server replaces the pcs tag with the value of the expression, or the contents of the tag if the PCS tag expression fails. `IPresentationTemplateManager.ValidateTemplateText` can be used to check basic PCS tag syntax but the method does not guarantee proper tag evaluation at publishing time. Though Text outside pcs tags is left unchanged when the template is processed during publication. Tags can appear inside HTML elements, inside HTML tags, and inside quoted strings.

The following is an example of Presentation Template text that can be used with `IPresentationTemplateManager.CreatePresentationTemplate` and `IPresentationTemplate.TemplateText`.

    <pcs:value expr="headline"></pcs:value>
    <pcs:value expr="article.author">Anonymous</pcs:value>
    <pcs:value property='writer.name'></pcs:value>
    <img src="<pcs:value expr="photo.location"></pcs:value>">
    <a href="<pcs:value property='homepage.location'></pcs:value>">
    <pcs:value expr='creation_time' format="MMMM dd"></pcs:value>">

Refer to the Administrator Guide for Content Server for additional details on Presentation Template functionality and sample template text values.

The following is an example of validating template text against a persisted `IPresentationTemplate`.

    string templateText = "No pcs tags in the initial Presentation Template.";
    IFolder rootFolder = folderManager.GetRootFolder();
    IPresentationTemplate presentationTemplate = presentationTemplateManager.CreatePresentationTemplate(rootFolder, "New Presentation Template", templateText);
    // Persist the presentationTemplate
    presentationTemplate.Store();
    string[] errorsInText = presentationTemplateManager.ValidateTemplateText(presentationTemplate, presentationTemplate.TemplateText);
    if(errorsInText.Length != 0)
    {
     // Correct errors in the Presentation Template text
    }
    else
    {
     // No errors were found
    }
    string updatedTemplateText = "<a href=\"<pcs:value property=\'homepage.location\'></pcs:value>\">";
    errorsInText = presentationTemplateManager.ValidateTemplateText(presentationTemplate, updatedTemplateText);
    // Repeat the above check of the String[] errorsInText
    // to determine if the updatedTemplateText contained errors
    presentationTemplate.TemplateText = updatedTemplateText;
    // Persist the presentationTemplate with the new template text
    presentationTemplate.Store();

For a list of all members of this type, see IPresentationTemplateManager Members.

Plumtree.Remote.PRC.Content.PresentationTemplate.IPresentationTemplateManager
Plumtree.Remote.PRC.Content.PresentationTemplate.IPublishablePresentationTemplateManager

public interface IPresentationTemplateManager

#### Requirements

Namespace: Plumtree.Remote.PRC.Content.PresentationTemplate

Assembly: edk (in edk.dll)

#### See Also

IPresentationTemplateManager Members | Plumtree.Remote.PRC.Content.PresentationTemplate Namespace