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
<#@ template hostspecific="true" language="C#" #> | |
<#@ output extension=".txt" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="VSLangProj" #> | |
<#@ import namespace="System" #> | |
<#@ import namespace="System.Reflection" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ assembly name="EnvDTE" #> |
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 Headless.ItemService; | |
using Sitecore.Pipelines; | |
using System.Web.Http; | |
namespace Headless | |
{ | |
public class ConfigureActionFilters | |
{ | |
private HttpConfiguration configuration; | |
private RestrictDatabaseActionFilter actionFilter; |
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 Sitecore.Mvc.Helpers; | |
using Sitecore.Mvc.Pipelines; | |
using Sitecore.Mvc.Pipelines.Response.RenderRendering; | |
using Sitecore.Mvc.Presentation; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Web; |
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 Sitecore.Mvc.Presentation | |
@using Sitecore.Mvc | |
@model RenderingModel | |
@{ | |
Layout = null; | |
Sitecore.Context.Items["twitter:title"] = Model.Item["title"] | |
Sitecore.Context.Items["twitter:description"] = Model.Item["description"] | |
} | |
<h1>@Html.Sitecore().Field("title")</h1> | |
@Html.Sitecore().Field("text") |
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 Sitecore.Mvc | |
@using Sitecore.Mvc.Analytics.Extensions | |
@{ | |
Layout = null; | |
} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>@Html.Sitecore().Field("title", new { DisableWebEdit = true })</title> | |
@Html.Sitecore().VisitorIdentification() |
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
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<style type="text/css"> | |
html { height: 100% } | |
body { height: 100%; margin: 0; padding: 0 } | |
#map-canvas { height: 100% } | |
</style> | |
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=...&sensor=false"> | |
</script> |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Sitecore.ContentSearch.ComputedFields; | |
using Sitecore.ContentSearch; | |
using Spatial4n.Core.Context; | |
using Lucene.Net.Spatial.Prefix.Tree; | |
using Lucene.Net.Spatial.Prefix; |
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 Sitecore.Mvc.Controllers; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using Sitecore.Mvc.Presentation; | |
using Sitecore.Mvc.Common; | |
namespace Sitecore.Mvc.Contrib.Controllers | |
{ | |
public class AreaControllerRunner : ControllerRunner, IControllerRunner | |
{ |
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 Sitecore.Mvc.Common; | |
using Sitecore.Mvc.Presentation; | |
using Sitecore.Mvc.Extensions; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
using System.Web.Mvc.ExpressionUtil; |
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
// Use the async execute | |
var asyncController = controller as IAsyncController; | |
Task.Factory.FromAsync(asyncController.BeginExecute, asyncController.EndExecute, PageContext.Current.RequestContext, null).Wait(); | |
// The old way (sync) | |
//(controller as IController).Execute(PageContext.Current.RequestContext); |
NewerOlder