SP.Publishing.Variations.getPeerUrl Method (sp.publishing)

Returns the corresponding publishing page URL for the specified SP.Publishing.VariationLabel object (sp.publishing) object.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.Publishing.Variations.getPeerUrl(context)

Parameters

  • context

  • currentUrl
    The server-relative URL of the page whose corresponding object in the specified label is requested.

  • labelTitle
    The Title of the target label that the page is requested in.

Return value

The URL.

Remarks

This method returns the server-relative URL of the corresponding page in the indicated label if there is one. If the server-relative URL is not found, then this method returns the corresponding website URL in that label. Finally, if the website URL is not found, then this method returns the corresponding URL of the label.