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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Newtonsoft.Json; | |
using Umbraco.Forms.Core.Enums; | |
using System.Net; | |
using System.Collections.Specialized; | |
using Umbraco.Core.Logging; | |
using Umbraco.Forms.Core.Providers.Models; |
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
var result = await "http://localhost:8080/lzp/servRoot" | |
.PostUrlEncodedAsync(new { | |
className = "com.lzp.service.UserInfoService", | |
methodName = "login", | |
user_name = "123", | |
user_pwd = "123" | |
}) | |
.ReceiveJson<TestResultModel>(); |
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 IPublishedContent GetGlobalContentNode() | |
{ | |
return (IPublishedContent)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem("Application.BusinessLogic.Services.GetGlobalContentNode", () => { | |
var settingsNode = GetNonPageContentNode(); | |
//Get the child folder node - Configuration Folder | |
var configFolder = settingsNode.Children.SingleOrDefault(x => x.DocumentTypeAlias == Constants.DocTypes.SiteConfigurationFolder); | |
if (configFolder == null) { return null; } |
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
<rule name="RedirectToDutchHomepage" enabled="true" stopProcessing="true"> | |
<match url="^$"></match> | |
<conditions> | |
<add input="{HTTP_ACCEPT_LANGUAGE}" pattern="^nl"></add> | |
</conditions> | |
<action type="Redirect" url="https://{HTTP_HOST}/nl/"></action> | |
</rule> | |
<rule name="RedirectToFrenchHomepage" enabled="true" stopProcessing="true"> | |
<match url="^$"></match> | |
<conditions> |
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
@inherits UmbracoTemplatePage | |
@{ | |
Response.ContentType = "text/xml"; | |
// The variables in this code block are the only ones you might need to change a little to get it to work | |
var blogName = "Cultiv"; | |
var currentUrl = string.Format("https://{0}", Request.Url.Host); | |
// Find first node under the root of document type BlogOverview | |
var blogNode = Model.Content.AncestorOrSelf(1).Descendants("BlogOverview").First(); |
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
@foreach(var group in Model.Children.InGroupsOf(2)) | |
{ | |
<div class="row-of-two"> | |
@foreach(var item in group) | |
{ | |
<span>@item.Name</span> | |
} | |
</div> | |
} |
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
@model dynamic | |
@using Umbraco.Web.Templates | |
@functions { | |
public static string EditorView(dynamic contentItem) | |
{ | |
string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); | |
view = view.ToLower().Replace(".html", ".cshtml"); | |
if (!view.Contains("/")) |
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
<link rel="preload" href="css/global.min.css" as="style" onload="this.rel='stylesheet'"> | |
<noscript><link rel="stylesheet" href="css/global.min.css"></noscript> | |
<script> | |
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ | |
!function(a){"use strict";var b=function(b,c,d){function j(a){if(e.body)return a();setTimeout(function(){j(a)})}function l(){f.addEventListener&&f.removeEventListener("load",l),f.media=d||"all"}var g,e=a.document,f=e.createElement("link");if(c)g=c;else{var h=(e.body||e.getElementsByTagName("head")[0]).childNodes;g=h[h.length-1]}var i=e.styleSheets;f.rel="stylesheet",f.href=b,f.media="only x",j(function(){g.parentNode.insertBefore(f,c?g:g.nextSibling)});var k=function(a){for(var b=f.href,c=i.length;c--;)if(i[c].href===b)return a();setTimeout(function(){k(a)})};return f.addEventListener&&f.addEventListener("load",l),f.onloadcssdefined=k,k(l),f};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this); | |
/*! loadCSS rel=preload po |
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
using System; | |
using System.IO; | |
using System.Web.Hosting; | |
using Umbraco.Core; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.Models; | |
using Umbraco.Web; | |
using Umbraco.Web.WebApi; | |
/// <summary> |
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
<!-- Our font file is fonts.css --> | |
<script> | |
/*! | |
loadCSS: load a CSS file asynchronously. | |
[c]2014 @scottjehl, Filament Group, Inc. | |
Licensed MIT | |
*/ | |
/* exported loadCSS */ |
NewerOlder