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
Usually a page variation is automatically created for a page in the following situations:
The automatic creation is initiated from either the ItemUpdated event or ItemCheckedIn event implemented in the Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver class, which are bound to the Pages library.
If moderation and minor versions are disabled on a Pages library, the ItemCheckedIn event will initiate the content propagation.
If moderation and/or minor versions are enabled on the Pages library, the ItemUpdated event will initiate the content propagation if the item is in either in approved or scheduled moderation state.
Note: Be aware that automatic propagation will not happen if moderation and minor versions are disabled and also the requirement to check-in and check-out items when updating the item is disabled. The reason is that in this situation the ItemCheckedIn event will not fire as not check-in occurs.
As discussed in an Part 4 the event receiver will create a Scheduled Work Item for the PropogateVariationPageJobDefinition which will perform the content propagation. The same timer job is also responsible to propagate changes done to existing pages in the source label to the target label.
There are certain situations where customers do not want to have automatic page creation or recreation in the target labels. Therefore automatic page variant creation might be disabled.
In case that automatic page variant creation is disabled it is required to create a variant manually using one of the following options:
Note: You can also create page variants using the Update button in the ribbon. Be aware that this will automatically create/update page variants in all target labels. This option does not only update existing peers but also create new peers in labels where the page has not been variated to using the default options - similar to the automatic creation mode.
This behavior prevents granular content updates to existing peers in case that DisableAutomaticPropagation is set to True.
Both options redirect to the _layouts/CreatePage.aspx page passing in details about the original item for which the variant should be created like item id, list id, web id and folder the item resides in:
When creating a page variant manually it is possible to select a different but compatible page layout (means a page layout associated with the same content type). You can also choose a different Url name, title and description but not a different site and folder relative path. The page will be created in the peer site of the source site and the same folder in the pages library as the item in the source site. If a different folder location is required you can move the item to the desired folder after it got replicate to the target label.
It is also possible to specify for each created page variant whether to copy the resources used in the page to the target label or to reference them in the source label.
The settings choosen on the page will be passed to the CreateVariationPageJobDefinition timer job within the Scheduled Work Item.
Usually content changes are automatically propagated to all existing page variants through the PropagateVariationPageJobDefinition.
Except if automatic content change propagation is disabled by settings the DisableAutomaticPropagation option to False.
In case that automatic propagation is disabled, the only way to force a content update in the target labels is to use the Update Variations option in the Ribbon.
From the Publish Tab of the Ribbon while browsing the page:
Important: Using this action the page will be propagated to all target variation labels. Unlike automatic update operations that means that page variants will also be created in labels which did not have a page variant before the update operation.
The content propagation will be performed by the PropogateVariationPageJobDefinition timer job.
Thank you!! Thanks for taking the time to write this detailed blog post series Stefan. I have thought about Variations but never had time to dig into it much. These posts with clear step-by-step screen shots provide a jump start I couldn't get any other way. I'm sure this will be very helpful to many others too.
How long does it take Google to update? Not soon enough. =)
Thank you, I understand now how it works :)
how to make a link to change language? If we don't want to make it as dropdown list.
Hi SP Dev,
see here blogs.technet.com/.../sharepoint-variations-the-complete-guide-part-12-customization.aspx
Section "Creating a Variation Label Menu Control"
Can you create a page in a variation site only or does it always need to start by creating a page in the source language for the site and then creating the variations on each variation site?
yes you can - but this page will then only live in the specific labe you created it in. The Variation System will not be Aware of this page and the Content will not be replicated to the other Labels.
Can you have a workflow that only updates certain site variations instead of propagating to all or no site variations. For example I have a site that has regional news in Latin America and would only like to have the article in English, Spanish and Portuguese-Brazilian. They don't want to propagate any of the other 6 language variation sites we have.
Hi Jeanpierre, the way to set this up would be to create variations into all languages and then delete the pages in those labels where they should not appear.If you configure variations to not recreate deleted pages updates then you get what you are looking for.Cheers,Stefan
Sorry. One more question. Is there a way to set the variations to not overwrite the variation sites with the source code of the parent variation site? For example, I update my page in English and it overwrites on the variation sites the English version of the page on all the variation sites. In order to update the variation site, I need to revert to last major version of the page and then make the in language updates.
Hi Jeanpierre,please check the blue box in the "Automatic Creation" section of this article: http://blogs.technet.com/b/stefan_gossner/archive/2011/11/18/sharepoint-variations-the-complete-guide-part-5-configuration-overview.aspxCheers,Stefan
Thx Stefan for this helpful variation reference but i am facing a weird problem when i tried to create page variation manually from ribbon button the form of creation is disabled did you see this problem before ?thx in advance
Hi Zahraa,the button will be disabled in the following scenarios:1) the page is in a site which has not been variated to target labels2) page variants exist in all target labels where the parent site has been variated to3) the page was created in a different label than the source label.For 1) please check in "manage content and structure" if the parent site is part of the variation hierarchy (should have a purple triangle in the icon).Cheers,Stefan
I came across one issue.
Peer Pages which are propogated to unpublished state by Variation Timer Job, i want that pages to be published automatically.
Please suggest something how can i achieve this.