Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

SPUtility.GetThemedImageUrl method

SharePoint 2013

Gets the path to the themed version of an image, if applicable. If the current web is not themed or there is no context web, the original URL is returned. Furthermore, if originalUrl or themeKey is null or empty, the originalUrl is always returned.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public static string GetThemedImageUrl(
	string originalUrl,
	string themeKey
)

Parameters

originalUrl
Type: System.String

The original URL to the image. Must be a server-relative path.

themeKey
Type: System.String

The theme key passed into the ReplaceColor theming annotation.

Return value

Type: System.String
A server-relative URL to the themed image, or the original URL.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.