Skip to content

Instantly share code, notes, and snippets.

View vtml's full-sized avatar

Vincent Lui vtml

View GitHub Profile
@vtml
vtml / TdsGlobal.config
Last active December 5, 2018 04:43
Referencing T4 Code Generation Templates
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!--
In the default configuration of the global file, the values for a configuration in the global file supersede the values
in the project configuration. This behavior can be changed by specifying a condition on the property as follows:
<SitecoreWebUrl Condition=" '$(SitecoreWebUrl)' == '' "></SitecoreWebUrl>
By adding the above condition, the value specified in the global configuration file will only be applied if the
@vtml
vtml / RewriteMaps.config
Created September 19, 2018 23:59
Rewrite Map for Custom Cultures
<rewriteMaps>
 <rewriteMap name="CustomCultures">
 <add key="jp" value="jm" />
 </rewriteMap>
</rewriteMaps>
@vtml
vtml / UrlRewritesAndRedirects.config
Created September 19, 2018 23:55
Custom Culture URL Rewrite Rule
<rule name="RewriteCustomCultures" enabled="true">
 <match url="^(/?)en-(jp)(/?)(.*)?" />
 <action type="Rewrite" url="en-{CustomCultures:{R:2}}/{R:4}" appendQueryString="true" />
 </rule>