Archive
Posts Tagged ‘target’
SharePoint 2013: Identifying the variation source and target with PowerShell
While working with one reporting requirement I needed to eliminate the variation targets and only need to consider variation sources. I struggled to find out the property which will help me to identify the page is variation source or target.
Solution:
Publishing web and Publishing page have the property called as ‘PublishingPage.Label.IsSource’ which we can use to identify the source page and source web. The same way we can use the publishing web level property as well.
if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($childWeb)){ $spPubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($childWeb); $item = $spPubWeb.PagesList.GetItemById($row.ID); $pubPage = [Microsoft.SharePoint.Publishing.PublishingPage]::GetPublishingPage($item); if($pubPage.VariationPageUrls.Count -eq 0) { #Page directly created in language sites and not Variated from source } else #Page Variated { if($pubPage.Label.IsSource) # then check if the web is Label IsSource { #this page is variation source } } }
Hope this will help, happy learning.
Categories: Microsoft SharePoint, Microsoft SharePoint 2010, Powershell, SharePoint2013
Tags: Identifying, Powershell, SharePoint, SharePoint 2013, Sharepoint2010, SharePoint2013, source, target, variation

Blog Stats
- 104,195 hits
Archives
- November 2019
- July 2019
- September 2018
- July 2018
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- June 2016
- May 2016
- March 2015
- February 2015
- December 2014
- October 2014
- July 2014
- June 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- March 2013
- February 2013
- November 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- April 2011
- February 2011
- February 2010
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
« Nov | ||||||
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |