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.Globalization | |
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
Layout = null; | |
string[] languages = HttpContext.Current.Request.UserLanguages; | |
var detectedLanguage = false; | |
var urlToRedirect = "/en/"; // TODO : go to first node homepage? | |
if (languages != null && languages.Any()) |
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 title = "Title Page"; | |
var description = "Page Description"; | |
var image = "http://www.website.com/image-share.jpg"; | |
} | |
<title>@title</title> | |
<meta name="description" content="@description" /> | |
<link rel="@image" type="image/jpeg" /> | |
<meta property="og:type" content="website" /> |
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 () { | |
//name of the Unit Test Module | |
module('Sample'); | |
var indexOn = 0; | |
//object array with the webservices to call | |
var apiUrls = [ | |
{ | |
name: "GetAll", //name | |
numberOfTests: 1, //number of tests to be done | |
url: '/base/example1/GetAll', //url of my webservice |
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 class CustomRoutes | |
{ | |
public static void Register() | |
{ | |
RouteTable.Routes.MapRoute( | |
name: "Product", | |
url: "Product/{action}/{id}", // dont use {controller} | |
defaults: new { | |
controller = "Product", // dont skip this line | |
action = "Index", |
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 CacheManager | |
{ | |
// for session cache use HttpContext.Current.Cache class | |
/// <summary> | |
/// Gets the object from cache. | |
/// </summary> | |
/// <param name="objectName">Name of the object.</param> | |
/// <param name="objectInCache">The object in cache.</param> | |
/// <returns></returns> |
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
ISearcher _searchProvider = ExamineManager.Instance.SearchProviderCollection["MySearcher"]; | |
var criteria = _searchProvider.CreateSearchCriteria(); | |
string rawQuery = ""; | |
// REMOVE 2 length words and other special words | |
var words = searchString.Split(' ').Where(w => !"com,sem,dos,das,por,nos,nas".Contains(w.Trim())).Where(w => w.Trim().Length > 2); | |
if(!words.Any()) | |
{ |
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 () { | |
//name of the Unit Test Module | |
QUnit.module('Participations'); | |
var indexOn = 0; | |
//object array with the webservices to call | |
var apiCalls = [ | |
{ | |
name: "POST User", | |
numberOfTests: 1, | |
url: '/api/PastimeApi/', |
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
<!-- REDIRECT NON-WWW TO WWW --> | |
<add name="301ReDirect_NON-WWW_TO_WWW" | |
redirectMode="Permanent" | |
redirect="Domain" | |
ignoreCase="true" rewriteUrlParameter="IncludeQueryStringForRewrite" | |
virtualUrl="http://mydomiain.com/(.*)" | |
destinationUrl="http://www.mydomain.com/$1" /> |
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.Globalization | |
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
Layout = null; | |
string[] languages = HttpContext.Current.Request.UserLanguages; | |
var detectedLanguage = false; | |
var urlToRedirect = "/en/"; // TODO : go to first node homepage? | |
HttpCookie cookieOptIn = Request.Cookies.Get("curLang"); |
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
<requestHandler> | |
<urlReplacing removeDoubleDashes="false" toAscii="false"> | |
<char org=" ">-</char> | |
<char org="""></char> | |
<char org="'"></char> | |
<char org="%"></char> | |
<char org="."></char> | |
<char org=";"></char> | |
<char org="/"></char> | |
<char org="\"></char> |
OlderNewer