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:
- Linking priority. To get the component links pointing towards the full news article version set the linking priority of this CT to high (or the others to low).
- Template type: Vbscript, Jscript, XSLT, Compound template, .NET.
- Output format: XML, HTML, ASP, JSP etc.
- Publication model: Embedded on a page (static), Dynamic.
- Linked schemas. Components based on these schema will be rendered with the CT. •
Comments
6 Responses to “SDL Tridion Component Template”
Leave a Reply


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
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.
Hi Albert,
Can we create component templates using XLST.
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 …
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
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: