Source for learning templating in Tridion using XSLT and C#
Asked Answered
D

4

9

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

Defroster answered 29/1, 2013 at 6:26 Comment(2)
Thanks for your question, could we interest you in committing to the Area 51 Tridion specific proposal. Sign up with the same SO account if you have a moment.Gapes
Done! Thanks for introducing me to the site :)Defroster
C
11

+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.

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.

Chlortetracycline answered 29/1, 2013 at 8:32 Comment(1)
Thanks a lot! Yes, I am trying to convince the management for a SDL training however, as expected it is fraught with oppositions because of the cost. I will try out the sources that have been mentioned.Defroster
G
6

I have to recommend taking a training as the easiest way to start. I understand this is not always well received by partners or customers due to training costs, but you definitely get your value back very quickly by not wasting time trying to figure out the basics.

Once you understand the basics, then it's like any other technology: practice makes perfect. An exercise I used to ask people to do when they started with Tridion was to output a simple page, like the google.com homepage, then start slowly changing the content to come from components, add inline editing, etc.

Baby steps - and ask your questions here!

Geffner answered 29/1, 2013 at 7:20 Comment(0)
M
3

I think, You can find some of best example of C# templating on below link

http://yatb.mitza.net/

Monocyte answered 29/1, 2013 at 6:39 Comment(0)
B
3

Agreeing with Nuno. You may also read SDL Live content documentation (requires login).

Binni answered 29/1, 2013 at 7:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.