This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.*?"Name":\s"(?<CaptureValue>.+?)".*?} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IEnumerable<TemplateItem> GetAllMasters(this Item item) | |
{ | |
var nodes = new Stack<TemplateItem>(new[] { item.Template }); | |
var node = nodes.Pop(); | |
yield return node; | |
foreach (var n in node.BaseTemplates) nodes.Push(n); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filterSelectElements: function() { | |
jQuery("select,input:checkbox").not(".form-gate").change(function () { | |
var selectedItems = jQuery("select,input:checkbox:checked,input#filterq").not(".form-gate"); | |
var url = "?page=1&overridedefault=true"; | |
// Grab all select boxes and check if they need to redirect to a url | |
var selectUrl = false; | |
var selectElements= jQuery("select"); | |
jQuery(selectElements).each(function (count, item) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SitecoreType] | |
public class GlassFrameBase | |
{ | |
#region Base Members | |
[SitecoreId, IndexField("_id")] | |
public virtual Guid Id { get; set; } | |
[SitecoreInfo(SitecoreInfoType.Language), IndexField("_language")] | |
public virtual string Language { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IEnumerable<T> Search<T>(Func<T, bool> whereCriteria) where T : GlassFrameBase, new() | |
{ | |
using (var context = _index.CreateSearchContext()) | |
{ | |
try | |
{ | |
var type = typeof(T); | |
if (!_service.GlassContext.TypeConfigurations.ContainsKey(type)) | |
{ | |
_service.GlassContext.Load(new AttributeTypeLoader(type)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//our base implementation | |
[SitecoreType] | |
public class GlassBase : IGlassBase | |
{ | |
[SitecoreId] | |
public virtual Guid Id { get; private set; } | |
[SitecoreInfo(SitecoreInfoType.Language)] | |
public virtual Language Language { get; private set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************** | |
* GSALib Wrapper for Google Search Appliance | |
* GSA.Paragon.Utils | |
* Written by Jon Upchurch | |
* Copyright 2013 by Paragon Consulting, Inc. | |
* Free to use, distribute, and modify | |
* with this credit comment retained. | |
****************************************/ | |
using GSALib.Constants; | |
using GSALib.GSA; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SitecoreClass(TemplateId = "My-Guid-Here")] | |
public class DictionaryDomain : GlassBase {} | |
[SitecoreClass(TemplateId = "My-Guid-Here")] | |
public class DictionaryEntry : GlassBase | |
{ | |
[SitecoreField] | |
public virtual string Key { get; set; } | |
[SitecoreField] | |
public virtual string Phrase { get; set; } |