No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Sitecore.Utility.Test
Sitecore.Utility
.gitattributes
.gitignore
Sitecore.Utility.sln
readme.md

readme.md

Intro

This repository contains some utils functions for Sitecore. You can use the full project or just extract the functions you want easily.

The functions

StringExtensions

SanitizeQuery

Sanitize an XPath query. This method encapulate the query segments by # # to avoid the errors with the reserved keywords or the issues with the items who begin by 0

Example:

var myQuery = "/sitecore/content/TestSites/Test/09/28/15/56/*".SanitizeQuery();
var item = Sitecore.Context.ContentDatabase.SelectSingleItem(myQuery);