Part 1 - The BasicsPart 2 - User InterfacePart 3 - TriggersPart 4 - Timer JobsPart 5 - Configuration OverviewPart 6 - Configuration InternalsPart 7 - Variation Hierarchy CreationPart 8 - Creating Page VariantsPart 9 - Creating Site VariantsPart 10 - Restructuring the HierarchyPart 11 - Variations Fixup ToolPart 12 - CustomizationPart 13 - LoggingPart 14 - TroubleshootingPart 15 - "View Changes" ButtonPart 16 - Translation SupportPart 17 - MOSS 2007 vs. SP 2010Part 18 - FAQ
The variation system in SharePoint allows automatically creating and updating content in target variation labels.
Some of these actions are performed silently without a user requesting variation updates explicitly through UI interaction.
In order to perform these updates it is necessary for the variation system to be informed about content changes and changes in the variation hierarchy to keep the links between the variation peers intact.
To achieve this, the variation system registers different event handlers, which trigger content updates and the maintenance of the underlying data structures:
This event is used to restore and update relationships list entries in case that a publishing page was restored from the recycle bin.
This event is used to trigger the peer page creation and peer page update if automatic content creation and propagation is enabled for Pages libraries which have minor versions and/or content moderation enabled.
This event is used to trigger the peer page creation and peer page update if automatic content creation and propagation is enabled for Pages libraries which have minor versions and content moderation disabled.
This event is used to collect the information about the variation group the publishing page which is about to be deleted belongs to - to make it available in the ItemDeleted event firing after the delete operation. Inside the ItemDeleted event it is not possible to get this information directly from the publishing page as this page has already been deleted at this time.
This event is used to update the relationships list entries for deleted and recycled publishing pages.
In case of a restore of a deleted page from the recycle bin, these actions have to be reverted. See the ItemAdded event for details.
This event is used to trigger source site variation to target labels when the Publishing feature is activated on a site. This happens as well when a new Publishing site is provisioned inside the source label or if the feature is manually activated on a site that resides in the source label.
This event is used to delete the relationship list entries and the variation specific properties when deactivating the publishing feature on a site.
This event is used to cancel a delete operation in case that the site being deleted is the Root Site of the Variation Hierarchy (if spawned labels exist) or a Top site of a Variation Label. In all other cases, the variation system uses this event to clean up the relationship list items for the deleted site and its pages.
This event is used to cancel the move operation in case that the site being moved is the Top site of a Variation Label, as moving a Variation Top site would destroy the variation label it belongs to.
This event is used to trigger source site variation to target labels if a site is moved from outside the source label into the source label. In addition, it will cleanup the information in the relationship list in case that a site is moved out of a variation label.
So where do you tie into that event? I need to create a new list whenever a new variation label is created and then copy list contents from a list on the root to that list. This wouldn't be an issue except that the list in the root was created in code instead of using the SharePoint UI to create it, so it cannot be moved/copied into the base variation to be duplicated.
What you could do is to register an item updated event for the variation labels list.
Here you could check when a "Hierarchy Is Created" field is changed to perform the copy.
Thank you! I still have one more problem. When I put ListUrl="/Variation Labels", it doesn't pick it up. It just fires ItemUpdated for ALL lists. The only url I can find for variation labels after going through debugging and attaching to process says that the url for variation labels is "/Variation Labels". Any ideas?
Hm... haven't tried but it is a normal SharePoint List. So if this works for other lists I would expect it to work for this list as well.