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
// Use server-side JavaScript to filter your audience further | |
// You have full access to the guest context which can be accessed under guest, e.g. guest.email | |
// Any truthy return value will pass the audience filter, it is recommended to return an object | |
// The value returned can be accessed from the variant API response as 'filter' | |
(function () { | |
var converted = "[[Has/Has not | enum(has, has not) | has | { required: true }]]"; | |
var campaignName = "[[Campaign(s) | multiselect() | | { required: true }]]"; | |
var campaignValues = campaignName.split(','); | |
var expectedType = "WEB"; |
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
#INSTALL CHOCOLATEY: https://chocolatey.org/docs/installation | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
#Install GIT FORK: https://chocolatey.org/packages/git-fork | |
choco install git-fork -y | |
#Install Visual Studio: https://chocolatey.org/packages?q=visual+studio+2019 | |
choco install visualstudio2019enterprise -y | |
#Install Visual Studio Code: https://chocolatey.org/packages/vscode |
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/"> | |
<sitecore> | |
<contentSearch> | |
<!-- Configuration sections for indexes --> | |
<indexConfigurations> | |
<!-- If an index has no configuration specified, it will use the configuration below. The configuration is not merged if the index also has | |
configuration, it is either this configuration or the index configuration. --> | |
<customSolrIndexConfiguration type="Sitecore.ContentSearch.SolrProvider.SolrIndexConfiguration, Sitecore.ContentSearch.SolrProvider"> | |
<!-- This flag will index all fields by default. This allows new fields in your templates to automatically be included into the 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
$SourceFolder = "D:\Downloads" | |
$DestinationFolder = "D:\test" | |
$IncludeFiles = ("*.jpeg","*.jpg") | |
Get-ChildItem $SourceFolder -Recurse -Include $IncludeFiles | Where-Object {$_.LastWriteTime -gt $ChangesStarted} | ForEach-Object { | |
$PathArray = $_.FullName.Replace($SourceFolder,"").ToString().Split('\') | |
$Folder = $DestinationFolder |
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 (new SiteContextSwitcher(SiteContextFactory.GetSiteContext("shell"))) | |
{ | |
//perform actions | |
} |
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
namespace <insert namespace here> | |
{ | |
public partial class FAQListing : SublayoutBaseExtended //this includes to get DataSourceItem or set to default item if none specified. | |
{ | |
private Item[] DataItems { get; set; } | |
private string DataSourceItemPath { get; set; } | |
public virtual Item GetDataSourceItem() | |
{ |
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
/* | |
* We need to run the code sample more than once to get a better idea of running time during analysis. | |
* set this value to be however many times you want to run the code to get a good analysis | |
* of running time | |
*/ | |
var maxCount = 20; | |
var start = new Date().getTime(); | |
for (var n = 0; n < maxCount; n++) { | |
/* perform operation you want to measure */ | |
} |
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
/*! | |
* GeoLocation | |
* @requires jQuery v1.7.2+ | |
* | |
* Description | |
* auto-populates a field with geo-location data | |
*/ | |
; (function ($) { | |
window.Motorama.geoLocation = window.Motorama.geoLocation || window.Motorama.BaseModule(function () { |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MediaLibraryExporter.aspx.cs" Inherits="RBSM.MediaLibraryExporter" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> |
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
/*! | |
* ProjectName SomeModule | |
* @requires jQuery v1.7.2+ | |
* @requires Underscore v1.3.3+ | |
* | |
* This comment block is here to encourage you to properly document your modules | |
* USE IT! | |
* Particularly if it has odd dependencies they should be listed. | |
*/ | |
NewerOlder