Search code examples
tridiontridion-2011

Customizing Default Page Template


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.


Solution

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