A Few Useful Tridion Extension Methods

8 thoughts on “A Few Useful Tridion Extension Methods”

  1. Hey Yoav,

    Pretty neat article 🙂

    One thing I wanted to ask was that I am working on Tridion R5.3 so I cant create Components programatically using the .NET API.

    Does Tridion 2009 support both Read/Write via the .NET API ?

    1. Thanks Kunal!

      Unfortunately, Tridion 2009 does not yet support the full read/write .NET. It is still read-only.

      Tridion 2010 however will supply us with the full read/write API. According to the roadmap its “envisioned” to be released in Q3 of next year.

  2. Cast your Repository to Publication and you’ll find your familiar RootStructureGroup.

    ((Publication)repository).RootStructureGroup;

    1. Thanks Puf,

      Any reason why its not in the Repository object as the RootFolder property is?

      BTW, The code i’ve shown for this method is identical to the one of the Tridion property so the question is then whats more expensive, casting or the extension-method lookup? 😉

      1. Just to set things clear, based on a little bit of research, extension methods do not cost anything since they are resolved at compile time.

    1. Great link, thanks.

      Notice though that my method and the one on StringWriter are different.
      The former is for pages and the latter for components. Also my example checks whether the page is published for specific target types.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s