1

The Structure group creation is based on the Default Page Template. I would like to extend the Default Page Template by adding a custom C# TBB so that when ever I publish a structure group, some action can be performed. Is it possible to extend the Default Page Template in Tridion? [Of course, I would be making a local copy in child publication prior to customizing it.]

If it is customizable, how can I get the reference to the current (publishing)structure group in C# TBB?

Thanks in advance.

TempTracer
  • 137
  • 5
  • Same situation at my end. If I want to capture the publishing/unpublshing event for structure group will be very helpful. – Hiren Mistry Jan 08 '13 at 06:31

2 Answers2

4

You can edit the default page template just like any normal page template.

It's possible to also specify what the default page template should be at both the Publication and Structure Group level.

johnwinter
  • 3,624
  • 15
  • 24
  • Thanks for the reply. Yes, we can edit the default page template and we could see that actions are executed when we publish the page making use of edited default page template. However the question is more related to structure groups. When I publish the structure group, then those actions written in C# TBB seems to be not executed. – TempTracer Jan 08 '13 at 07:09
4

When you publish a Structure Group, all the pages within that SG that are already published are re-published, the SG itself does not publish (This may be why your code did not execute). You can specify that ALL pages within the SG should be published using the options in the publishing dialogue.

However, what you are describing is NOT a good fit for a C# TBB. Your template code will execute once for EVERY page that is published. What you are describing is a situation where you want to respond to a specific event occurring in the content manager (the publishing of a structure group). The correct extension point for this kind of customisation is an Event Handler.

David Forster
  • 1,390
  • 9
  • 16