Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source for learning templating in Tridion using XSLT and C#

I am working on a project which requires Tridion Component Templates to be written in XSLT and page templates to be written in C#. I know XSLT basics and I am totally new to C#.

Can anyone guide me to any sources of learning XSLT and C# templating for Tridion 2011. It would be of great help if you could. Thanks in advance!

If there is any better way to do the templating, suggestions are welcome. We can see if our client is accomodative for that.

Regards, Keirthana

like image 233
Keirthana Avatar asked Jan 29 '13 06:01

Keirthana


1 Answers

+1 to Nuno's point, the instructions, examples, and access to someone that's done it before makes training well worth it.

SDL Tridion Compound Page Templates are not written in C# alone, but use a combination of Template Building Blocks. Template Building Blocks (TBBs) consist of a layout part (typically DWT) as well as C# TBBs.

Alternatives

Template approach depends on the developers, development process, and available technologies. I've seen programmers struggle with Component Templates, not because of Tridion, but simply because of the languages involved. Be sure to get a good fit for your customer.

XSLT Component Templates may make SDL Tridion's inline editing features harder to implement. Though you have the flexiblity from XSLT's <template match="">, you lose some things you get "for free" such as:

  • resolving links and publishing binaries
  • a programmatic content model and access to the Tridion Object Model (at least at the CT level)
  • the package
  • separation of code from content

An alternative would be Compound Component Templates (modular templating). But again it depends on your environment.

Resources

  • SDL Live Content has high-level background information and examples. The first page and diagram under SDL Tridion 2011 shows the big picture and extension points.
  • SDLTridionWorld.com is another excellent resource for examples and descriptions, customers also have access to the API documentation. The forum especially has a lot more examples for XSLT CTs than StackOverflow (for now).
  • The community-driven Tridion Cookbook has examples and explanations as well, but across the entire Tridion API stack.

Reach out for training through SDL.com.

Basic Introductions

I've written some basic introductions and example for XSLT CTs and C# TBBs, but these aren't a substitute for training.

  • Basic XSLT template to see the source of a component.
  • The same idea, but with a C# TBB.
  • How to set up an C# assembly (uploaded a TBB as opposed to a TBB fragment)
  • Example DWT TBB

You mention being familiar with XSLT, I find using basic XSLT functions to help understand component details.

I've attempted the excercise Nuno describes as well (video included).

The biggest risk in skipping training, IMO, is getting either BluePrinting or the content model wrong. Definitely come back to ask questions as you go along.

like image 118
Alvin Reyes Avatar answered Oct 06 '22 15:10

Alvin Reyes