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
<script src="https://www.google.com/recaptcha/api.js"></script> | |
<script> | |
function timestamp() { var response = document.getElementById("g-recaptcha-response"); if (response == null || response.value.trim() == "") { var elems = JSON.parse(document.getElementsByName("captcha_settings")[0].value); elems["ts"] = JSON.stringify(new Date().getTime()); document.getElementsByName("captcha_settings")[0].value = JSON.stringify(elems); } } setInterval(timestamp, 500); | |
</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
public class ExecuteRenderer : Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer | |
{ | |
public override void Process( RenderRenderingArgs args) | |
{ | |
try | |
{ | |
base.Process( args); | |
} | |
catch (Exception ex) | |
{ |
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
configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> | |
<sitecore> | |
<pipelines> | |
<mvc.renderRendering> | |
<processor patch:instead="*[@type='Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer, Sitecore.Mvc']" type="Sitecore.sharedsource.Errors.Piplines.ExecuteRenderer, Sitecore.sharedsource.Errors"/> | |
</mvc.renderRendering> | |
</pipelines> | |
</sitecore> | |
</configuration> |
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
<div class="row"> | |
<div class="large-6 small-12 columns"> | |
@Html.Sitecore().DynamicPlaceholder("leftcolumn") | |
</div> | |
<div class="large-6 small-12 columns"> | |
@Html.Sitecore().DynamicPlaceholder("rightcolumn") | |
</div> | |
</div> |
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
<linkManager defaultProvider="custom"> | |
<providers> | |
<clear /> | |
<add name="custom" type="CustomLibrary.Links.CustomLinkProvider, CustomLibrary" addAspxExtension="true" | |
alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" lowercaseUrls="false" | |
shortenUrls="true" useDisplayName="false" /> | |
</providers> | |
</linkManager> |
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
<linkManager defaultProvider="custom"> | |
<providers> | |
<clear /> | |
<add name="custom" type="CustomLibrary.Links.CustomLinkProvider, CustomLibrary" addAspxExtension="true" | |
alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" lowercaseUrls="true" | |
shortenUrls="true" useDisplayName="false" /> | |
</providers> | |
</linkManager> |
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
#INVOKE Sitecore so it is aware about the upload folder | |
Start-Sleep -s 120 | |
#Import files | |
# for example $sourcepath : "E:\Copy" | |
$sourcepath = "[source folder]" | |
# for example "c:\inetpub\wwwroot\mySite\upload\importedMedia\" | |
$targetpath = "[Destination folder]" | |
$filterSourcefiles = get-childitem -path $sourcepath |
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 GetWildCardPageItemProcessor : GetPageItemProcessor | |
{ | |
public GetWildCardPageItemProcessor() | |
{ | |
} | |
public override void Process(GetPageItemArgs args) | |
{ | |
Assert.ArgumentNotNull(args, "args"); |
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 GetWildCardPageItemProcessor : GetPageItemProcessor | |
{ | |
public GetWildCardPageItemProcessor() | |
{ | |
} | |
public override void Process(GetPageItemArgs args) | |
{ | |
Assert.ArgumentNotNull(args, "args"); |
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
$sourcepath = "E:\FolderA\" | |
$targetpath = "E:\inetpub\wwwroot\site\upload\FolderA\" | |
"$(get-date -f yyyyMMdd-HHmmss) Getting files from source $sourcepath" | out-file -filepath $logFile -append | |
#$allsourcefiles = get-childitem -path $sourcepath | |
#"$(get-date -f yyyyMMdd-HHmmss) Found " + $allsourcefiles.Count | out-file -filepath $logFile -append | |
$initialDate = (Get-Date).AddDays(-1) | |
$endDate = (Get-Date).AddDays(1) | |
$allsourcefiles = get-childitem -path $sourcepath |
NewerOlder