This file contains hidden or 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 void InjectToExamineNode(int id, Dictionary<string, string> newFields = null) | |
{ | |
if (newFields.HasContent()) | |
{ | |
var content = new Content(id); | |
if (content.Id > 0) | |
{ | |
var doc = content.ToXDocument(false).Root; |
This file contains hidden or 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
[UmbracoRoute("Home", Action = "Index")] // [ML] - index not required really, just added for demo purposes | |
public class Homepage : Page | |
{ | |
public Homepage(IPublishedContent content) : base(content) { } | |
public string Title { get; set; } | |
} |
This file contains hidden or 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 class YomegoCMSHandler : IHttpHandler | |
{ | |
public bool IsReusable { get; private set; } | |
private RequestContext _requestContext { get; set; } | |
public YomegoCMSHandler(RequestContext requestContext) | |
{ | |
_requestContext = requestContext; |
This file contains hidden or 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 class YomegoCMSRouteConstraint : IRouteConstraint | |
{ | |
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection) | |
{ | |
return IsRoutable(httpContext); | |
} | |
private bool PopulateContext(CoreApp<CoreServiceContainer> app, HttpContextBase context, string url, UmbracoRouteAttribute contentType = null) | |
{ | |
// [ML ] -If this request has previously been routed, do nothing and route as context is populated |
This file contains hidden or 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 void RegisterRoutes(RouteCollection routes) | |
{ | |
var umbraco = new Route("{*url}", new RouteValueDictionary() { }, new RouteValueDictionary() { { "url", new YomegoCMSRouteConstraint() } }, new YomegoCMSRouteHandler()); | |
routes.Add(umbraco); | |
} |
This file contains hidden or 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 void Method<T>(string something) { | |
} |
NewerOlder