C# Class Sitecore.SharedSource.Commons.Extensions.StringExtensions

Extends the string class for custom methods
Exibir arquivo Open project: Velir/Sitecore-Commons

Public Methods

Method Description
GetItemByUrlParts ( this url ) : Item

Gets the item by url

GetItemByUrlParts ( this url, Database database ) : Item

Gets the item by url

GetItemByUrlParts ( this url, Database database, bool replaceDashes ) : Item

Gets the item by url

GetItemByUrlParts ( this url, Database database, bool replaceDashes, string sitePath ) : Item
QueryEscape ( this path ) : string

takes this string /sitecore/content/Home/Certified Education/Certified Learning/EO_MKM_0512/EO_Activity 0512/Module EAO and returns this string /#sitecore#/#content#/#Home#/#Certified Education#/#Certified Learning#/#EO_MKM_0512#/#EO_Activity 0512#/#Module EAO# Expects a leading slash and no trailing slash. This is what we get when calling InnerItem.Paths.path;

The xpath processor attempts to interpret certain words as keywords if they are found in an item's path. Examples include: "and", "or", and names with leading numbers

Method Details

GetItemByUrlParts() public static method

Gets the item by url
public static GetItemByUrlParts ( this url ) : Item
url this
return Item

GetItemByUrlParts() public static method

Gets the item by url
public static GetItemByUrlParts ( this url, Database database ) : Item
url this
database Database
return Item

GetItemByUrlParts() public static method

Gets the item by url
public static GetItemByUrlParts ( this url, Database database, bool replaceDashes ) : Item
url this
database Database
replaceDashes bool
return Item

GetItemByUrlParts() public static method

public static GetItemByUrlParts ( this url, Database database, bool replaceDashes, string sitePath ) : Item
url this
database Database
replaceDashes bool
sitePath string
return Item

QueryEscape() public static method

takes this string /sitecore/content/Home/Certified Education/Certified Learning/EO_MKM_0512/EO_Activity 0512/Module EAO and returns this string /#sitecore#/#content#/#Home#/#Certified Education#/#Certified Learning#/#EO_MKM_0512#/#EO_Activity 0512#/#Module EAO# Expects a leading slash and no trailing slash. This is what we get when calling InnerItem.Paths.path;
The xpath processor attempts to interpret certain words as keywords if they are found in an item's path. Examples include: "and", "or", and names with leading numbers
public static QueryEscape ( this path ) : string
path this
return string