SDL Tridion Component Template

A Component Template  or CT is a small program which is used to render (parts of) components based on  specified schema’s. In other words programs which create chunks of XHTML. In Tridion parlance these chunks are called Component Presentations.

It is possible to use different CT’s to render the same content. An example might be the rendering of a news article. You might want to present on your homepage a link to a new article. On a news overview page you might want to display the title with a short description of the news content. And there will be a place where the full article is displayed.

This can be achieved by defining three different CTs where each one renders the specific occurrence on the website.

Configuration options for a CT include:

Be Sociable, Share!

Comments

6 Responses to “SDL Tridion Component Template”

  1. Prasanna on October 10th, 2009 19:38

    Hi,

    Good Morning,
    I Have doubt regarding component presentation.
    Can we generate asp.net or any other user controls using the component presentation.
    Example:
    If i want to generate

    I will be creating a id,textmode,runat attributes in a schema.
    create a component for that.
    if i wrote the code in component template and pushed the content to generate the above tag,will it work?
    My server is wps portal server.
    It gets data from tridion.

    Thanks in advance.

    Prasanna

  2. Albert on December 11th, 2009 13:32

    Hi Prasanna,

    Not sure what it is you are trying to accomplish. It looks like part of your comment was lost somewhere.

    I assume the WPS portal server itself gets the component presentation from the Tridion broker. In that case my guess is that the code will not be executed.

  3. Sujendra on May 10th, 2012 09:47

    Hi Albert,

    Can we create component templates using XLST.

  4. Albert on May 10th, 2012 21:56

    Good question Sujendra, I’ve created entire websites using XSLT templates. No clue however if it is still available in 2011 and if it will be supported in future versions. Will check that tomorrow …

  5. Sujendra on May 11th, 2012 06:45

    I created Component Template using XSLT but I am not able to get the required output. Please guide me with an example.

    I created a simple schema with a text field and I created a component of that schema and used the following code in component template:

    The xml code generated in component is

    Pradeep

  6. Rajarshi on May 15th, 2012 05:55

    Hey albert,

    Good Morning. I have a doubt. I’ve created an XML file with scema – title(text), description(text), and image(multimedia link/jpeg). I’ve also created an XSL file to transform this XML file to HTML. The problem which I’m facing is that that HTML file is not displaying the image, instead showing a cross sign. What should I do.

    Given the Component(XML) File:

    The Namesake
    Booker prize awarded.

    Given Component Template Code:

    Publish Date:

Leave a Reply




FireStats icon Powered by FireStats