AUTOMATE VARIATIONS
In SharePoint 2013
WHO AM I
•
•
•
•
•
•
•
•
•
•
•
•
•

Language pack
Elements of variation
Limited boundaries
Enable VariationLabelMenu control
Configure Variations
Timer Jobs
Automate variation in PowerShell
Automate variation in C#
Automate variations Timer Jobs
Convert C# to PowerShell
Tools
Code Plex
Summary

AGENDA
LANGUAGE PACK
• http://www.microsoft.com/en-eg/download/details.aspx?id=3411
• there is support for creating up to 209 Variation labels on-premises,
• to Office 365 users, now supports up to 50 Variation labels.
ELEMENTS OF VARIATION
• Variation root site
• Variation label
• Variation sites
• Source variation site
• Target variation site

• Variations hierarchy
• Variations lists
• Variations pages
LIMITED BOUNDARIES
• Variations feature is a single-tier hierarchy.
• The source and target variation sites exist at the same level within the site
hierarchy.

• Content syncing is unidirectional.
• The variations feature syncs content from a source variation site to one or more
target variation sites.
• You cannot use the variations feature to sync content from a target variation site
back to a source variation site.
• Also, target variation sites cannot sync content to other target variation sites.
NOTE

SharePoint Server 2013 supports up to 209 variation labels.
SharePoint Online supports up to 50 variation labels.
ENABLE VARIATIONLABELMENU
• This control enables users to navigate to the related/equivalent pages in
other language sites.

Go to the location Program FilesCommon FilesMicrosoft SharedWeb Server
Extensions14TEMPLATECONTROLTEMPLATES
• Find the file "VariationsLabelMenu.ascx" and edit it.
• Add the below line to the contents of the file.

<cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMe
nuDataSource" DisplayText="Links" IsCallbackMode="true" runat="server" />
CONFIGURE VARIATIONS
• Install language pack
• Configure variation settings
• Create variation labels

• Create hierarchies
• Check variation log
TIMER JOBS
• Variations Create Hierarchies Job Definition
• Variations Propagate List Items Job Definition
• Variations Propagate Page Job Definition

• Variations Propagate Sites and Lists Timer Job
By default, content approval is enabled on target lists.

NOTE

When a new item is synced to a target list, it must be
approved before it will appear in a Content Query Web Part
on the target variation site.

Individual pages can be synced to specific target labels,
but individual list items can not.
You can only specify a complete list to sync to specific
target labels.
AUTOMATE VARIATIONS - PS

DEMO
AUTOMATE VARIATIONS – C#

DEMO
AUTOMATE VARIATIONS TIMER JOBS

DEMO
CONVERT C# TO PS
• .NET Reflector has an array of add-ons on CodePlex,
One of these is the PowerShell add-on that allows you to disassemble code
directly into PowerShell.

https://reflectoraddins.codeplex.com
PowerShellLanguage [.NET Reflector Add-Ins]
https://reflectoraddins.codeplex.com/wikipage?title=PowerShellLanguage
TOOLS
• .Net Reflector 8
• http://www.red-gate.com/products/dotnet-development/reflector/

• PowerGUI
• a graphical user interface and script editor for Microsoft Windows PowerShell.
• http://powergui.org
CodePlex
• Automate Variations using PowerShell
• https://powershellspvariations.codeplex.com/

• Automate Variations using C#
• https://csharpspvariations.codeplex.com/
SUMMARY
• Language pack
• Configure Variations
•
•
•
•

Configure variation settings
Create variation labels
Create hierarchies
Check variation log

• Timer Jobs
• Automate variation in PowerShell

• Automate variation in C#
• Convert C# to PowerShell
QUESTIONS
THANK YOU
• Keep up to date
My Blog: http://maiomardesouki.com/
FB page: Dubai SharePoint User Group https://www.facebook.com/DubaiSPUG
FB group: https://www.facebook.com/groups/DubaiSharePoint/
Twitter: https://twitter.com/dubaispug
LinkedIn: http://www.linkedin.com/groups?home=&gid=4630881
Yammer:
https://www.yammer.com/spyam/#/threads/inGroup?type=in_group&feedId=9
31043
• Dubai SharePoint User Group blog: http://dubaispug.wordpress.com
•
•
•
•
•
•

Automate Variations in SharePoint 2013

  • 1.
  • 2.
  • 3.
    • • • • • • • • • • • • • Language pack Elements ofvariation Limited boundaries Enable VariationLabelMenu control Configure Variations Timer Jobs Automate variation in PowerShell Automate variation in C# Automate variations Timer Jobs Convert C# to PowerShell Tools Code Plex Summary AGENDA
  • 4.
    LANGUAGE PACK • http://www.microsoft.com/en-eg/download/details.aspx?id=3411 •there is support for creating up to 209 Variation labels on-premises, • to Office 365 users, now supports up to 50 Variation labels.
  • 5.
    ELEMENTS OF VARIATION •Variation root site • Variation label • Variation sites • Source variation site • Target variation site • Variations hierarchy • Variations lists • Variations pages
  • 6.
    LIMITED BOUNDARIES • Variationsfeature is a single-tier hierarchy. • The source and target variation sites exist at the same level within the site hierarchy. • Content syncing is unidirectional. • The variations feature syncs content from a source variation site to one or more target variation sites. • You cannot use the variations feature to sync content from a target variation site back to a source variation site. • Also, target variation sites cannot sync content to other target variation sites.
  • 7.
    NOTE SharePoint Server 2013supports up to 209 variation labels. SharePoint Online supports up to 50 variation labels.
  • 8.
    ENABLE VARIATIONLABELMENU • Thiscontrol enables users to navigate to the related/equivalent pages in other language sites. Go to the location Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATECONTROLTEMPLATES • Find the file "VariationsLabelMenu.ascx" and edit it. • Add the below line to the contents of the file. <cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMe nuDataSource" DisplayText="Links" IsCallbackMode="true" runat="server" />
  • 9.
    CONFIGURE VARIATIONS • Installlanguage pack • Configure variation settings • Create variation labels • Create hierarchies • Check variation log
  • 10.
    TIMER JOBS • VariationsCreate Hierarchies Job Definition • Variations Propagate List Items Job Definition • Variations Propagate Page Job Definition • Variations Propagate Sites and Lists Timer Job
  • 11.
    By default, contentapproval is enabled on target lists. NOTE When a new item is synced to a target list, it must be approved before it will appear in a Content Query Web Part on the target variation site. Individual pages can be synced to specific target labels, but individual list items can not. You can only specify a complete list to sync to specific target labels.
  • 12.
  • 13.
  • 14.
  • 15.
    CONVERT C# TOPS • .NET Reflector has an array of add-ons on CodePlex, One of these is the PowerShell add-on that allows you to disassemble code directly into PowerShell. https://reflectoraddins.codeplex.com PowerShellLanguage [.NET Reflector Add-Ins] https://reflectoraddins.codeplex.com/wikipage?title=PowerShellLanguage
  • 16.
    TOOLS • .Net Reflector8 • http://www.red-gate.com/products/dotnet-development/reflector/ • PowerGUI • a graphical user interface and script editor for Microsoft Windows PowerShell. • http://powergui.org
  • 17.
    CodePlex • Automate Variationsusing PowerShell • https://powershellspvariations.codeplex.com/ • Automate Variations using C# • https://csharpspvariations.codeplex.com/
  • 18.
    SUMMARY • Language pack •Configure Variations • • • • Configure variation settings Create variation labels Create hierarchies Check variation log • Timer Jobs • Automate variation in PowerShell • Automate variation in C# • Convert C# to PowerShell
  • 19.
  • 21.
    THANK YOU • Keepup to date My Blog: http://maiomardesouki.com/ FB page: Dubai SharePoint User Group https://www.facebook.com/DubaiSPUG FB group: https://www.facebook.com/groups/DubaiSharePoint/ Twitter: https://twitter.com/dubaispug LinkedIn: http://www.linkedin.com/groups?home=&gid=4630881 Yammer: https://www.yammer.com/spyam/#/threads/inGroup?type=in_group&feedId=9 31043 • Dubai SharePoint User Group blog: http://dubaispug.wordpress.com • • • • • •