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
using System.Net.Http.Formatting; | |
using System.Web.Http; | |
using Foo.Web; | |
// automatically exectute this class' Start() method right after Application_Start (without needing to change global.asax) | |
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(WebApiConfig), "Start")] | |
namespace Foo.Web | |
{ | |
public static class WebApiConfig |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
Purpose: This include file simplifies the setup of Sitecore CD instances by removing any references to the Master database from Sitecore configuration files. | |
This include file should be used only on CD servers. | |
Important: Include files are applied in alphabetical order. The include files in root folder are applied before the include files in the subdirectories. | |
The subdirectories are applied in alphabetical order. Therefore this include file cannot remove any references to the Master database | |
that are defined in include files that are applied later. In this situation, you must rename this include file so that it is applied after |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
Purpose: This include file simplifies the setup of Sitecore CD instances by removing any references to the Master database from Sitecore configuration files. | |
This include file should be used only on CD servers. | |
Important: Include files are applied in alphabetical order. Therefore this include file cannot remove any references to the Master database | |
that are defined in include files that are applied later. In this situation, you must rename this include file so that it is applied after | |
any other include files that contain references to "master" database. |
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
@echo off | |
"%PROGRAMFILES(x86)%\MSBuild\14.0\bin\msbuild.exe" "Habitat.sln" /p:Configuration=Debug /m /t:Clean /nr:false | |
"%PROGRAMFILES(x86)%\MSBuild\14.0\bin\msbuild.exe" "Habitat.sln" /p:Configuration=Debug /m /t:Build /nr:false | |
echo Take note of the timing above, this is the CLEAN BUILD time | |
pause | |
"%PROGRAMFILES(x86)%\MSBuild\14.0\bin\msbuild.exe" "Habitat.sln" /p:Configuration=Debug /m /t:Build /nr: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
<a href="javascript:Sitecore.PageModes.PageEditor.postRequest('webedit:fieldeditor(command={11111111-1111-1111-1111-111111111111},fields=Field Name 1|Field Name 2,id={item-id-to-edit-with-braces})')">Edit fields</a> |
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
using System.Collections.Generic; | |
using System.Web.Http; | |
namespace Foo.Web.Sites.ExampleSite.Shared.Data | |
{ | |
// for more on Attribute Routing (used in this sample to create routes), see http://blogs.msdn.com/b/webdev/archive/2013/10/17/attribute-routing-in-asp-net-mvc-5.aspx | |
// the RoutePrefix is the base path to the API controller | |
[RoutePrefix("ExampleSite/api/Sample")] | |
// this defines how to perform default route lookups on methods (e.g. this routes the action to a method of the same name like asp.net MVC, and sets Get() to the default action) |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
Purpose: This include file simplifies the setup of Sitecore CD instances by removing any references to the Master database from Sitecore configuration files. | |
This include file should be used only on CD servers. | |
Important: Include files are applied in alphabetical order. The include files in root folder are applied before the include files in the subdirectories. | |
The subdirectories are applied in alphabetical order. Therefore this include file cannot remove any references to the Master database | |
that are defined in include files that are applied later. In this situation, you must rename this include file so that it is applied after |
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
using System.Collections.Generic; | |
using System.Linq; | |
using Blade.Utility; | |
using Sitecore; | |
using Sitecore.ContentSearch; | |
using Sitecore.ContentSearch.ComputedFields; | |
using Sitecore.Data.Fields; | |
using Sitecore.Data.Items; | |
using Sitecore.Layouts; |
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
# This script will set up (and install if needed) Apache Solr for a Sitecore instance. | |
# This does NOT configure Sitecore to use Solr, | |
# just the Solr server and cores for Sitecore to connect to once it is set up to use Solr. | |
# So, what does it do? | |
# | |
# * Installs SOLR, if needed, from the Bitnami SOLR stack: https://bitnami.com/stack/solr/installer | |
# * Creates a SOLR config set for the cores to share (shared schema) | |
# * Creates SOLR cores for all Sitecore indexes, including secondary cores to support online reindexing (Switch on Rebuild) |
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
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Text.RegularExpressions; | |
using System.Web.Mvc; | |
using Microsoft.Extensions.DependencyInjection; |