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
{ | |
"$schema": "../../.sitecore/schemas/ModuleFile.schema.json", | |
"tags": [ "platform" ], | |
"namespace": "Project.HeadlessSXAExample", | |
"items": { | |
"includes": [ | |
{ | |
"name": "ProjectTemplates", | |
"path": "/sitecore/templates/Project/<TENENT_NAME>", | |
"allowedPushOperations": "CreateUpdateAndDelete" |
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
function Get-CleanName() | |
{ | |
param ( | |
[string] $Name | |
) | |
return $Name.Replace(" ", "") | |
} | |
$templateItem = Get-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
public static class SearchExtensions | |
{ | |
public static IQueryable<TSource> ContainsOr<TSource, TKey>(this IQueryable<TSource> queryable, Expression<Func<TSource, TKey>> keySelector, IEnumerable values) where TKey : IEnumerable | |
{ | |
return Contains(queryable, keySelector, values, true); | |
} | |
public static IQueryable<TSource> ContainsAnd<TSource, TKey>(this IQueryable<TSource> queryable, Expression<Func<TSource, TKey>> keySelector, IEnumerable values) where TKey : IEnumerable | |
{ | |
return Contains(queryable, keySelector, values, false); |
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
namespace Sitecore.Foundation.React.Mvc | |
{ | |
using System; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using System.Web.Mvc; | |
public class JsxResult : ViewResult | |
{ |
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
<#@ Assembly Name="$(SolutionDir)\packages\Fortis.3.5.5.2\lib\net45\Fortis.dll" #> | |
<#@ Assembly Name="$(SolutionDir)\..\Libraries\Sitecore.Kernel.dll" #> | |
<#@ assembly name="$(ProjectDir)$(OutDir)Transitus.Rainbow.dll" #> |
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
var items = Sitecore.Context.Database.GetItem(new ID("{1FBCAB2D-8444-43FB-916C-951AE3FA244E}")).Axes.GetDescendants(); | |
Response.Write("<h1>{0} Items</h1>".FormatWith(items.Length)); | |
var sw = new Stopwatch(); | |
sw.Start(); | |
var displayNamesScapi = items.Select(item => item[FieldIDs.DisplayName]).ToList(); | |
sw.Stop(); |