Skip to content

Instantly share code, notes, and snippets.

/// <summary>Defines the run class.</summary>
/// <typeparam name="T">The rule context.</typeparam>
public class ApplyProfileValue<T> : RuleAction<T> where T : RuleContext
{
/// <summary>Gets or sets the script id.</summary>
/// <value>The script id.</value>
public string Profilecardkey { get; set; }
/// <summary>Executes the specified rule context.</summary>
public class ProfileCardMacro : IRuleMacro
{
public void Execute(XElement element, string name, UrlString parameters, string value)
{
Assert.ArgumentNotNull((object)element, "element");
Assert.ArgumentNotNull((object)name, "name");
Assert.ArgumentNotNull((object)parameters, "parameters");
Assert.ArgumentNotNull((object)value, "value");
var selectItemOptions = new SelectItemOptions();
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="sitecore" value="https://sitecore.myget.org/F/sc-packages/api/v3/index.json" />
</packageSources>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<log4net>
<appender name="RavenAppender" type="Bonfire.LogAppender.CustomAppender, Bonfire.LogAppender">
<file value="$(dataFolder)/logs/log.{date}.txt" />
<DSN value="https://XXXXXXXXX:XXXXXXXXX@sentry.io/200766" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
</layout>
<packages>
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="SharpRaven" version="2.2.0" targetFramework="net452" />
<package id="Sitecore.Logging" version="8.1.160519" targetFramework="net452" developmentDependency="true" />
</packages>
namespace Bonfire.LogAppender
{
using log4net.Appender;
using log4net.spi;
using SharpRaven;
using SharpRaven.Data;
public class CustomAppender : AppenderSkeleton
{
public string DSN { get; set; }
.scScrollbox.scFixSize4 { height: auto !important;}
<?xml version="1.0" encoding="utf-8" ?>
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<Sitecore.Shell.Applications.Dialogs.SelectRendering>
<FormDialog ID="Dialog" Icon="Core/32x32/open_document.png" Header="Open Item"
Text="Select the item that you wish to open. Then click the Open button." OKButton="Open">
<Stylesheet Src="SelectItemWithThumbnails.css" DeviceDependant="true" />
<Stylesheet Src="/sitecore/shell/Applications/Dialogs/SelectRendering/dialog.css" DeviceDependant="true" />
<Script Src="/sitecore/shell/Applications/Dialogs/SelectRendering/dialog.js" />
<CodeBeside Type="Abbey.Web.Custom.Dialogs.CustomSelectRenderingForm, Abbey.Web"/>
@dnstommy
dnstommy / dialog.js
Created January 19, 2017 01:19
Javascript needed to resize the dialog box for tabbed renderings in Sitecore
document.addEventListener('DOMContentLoaded', function(){
var parentDiv = parent.document.getElementsByClassName("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable");
if (parentDiv)
{
//console.log(all[0].style)
parentDiv[0].style.width = "1100px";
parentDiv[0].style.height = "600px";
}
@dnstommy
dnstommy / SelectRendering.xml
Created January 19, 2017 01:17
Tabbed renderings dialog for Sitecore
<?xml version="1.0" encoding="utf-8" ?>
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<Sitecore.Shell.Applications.Dialogs.SelectRendering>
<FormDialog ID="Dialog" Icon="Core/32x32/open_document.png" Header="Open Item"
Text="Select the item that you wish to open. Then click the Open button." OKButton="Open">
<Stylesheet Src="SelectItemWithThumbnails.css" DeviceDependant="true" />
<Script Src="/sitecore/shell/Applications/Dialogs/SelectRendering/dialog.js" />
<CodeBeside Type="Abbey.Web.Custom.Dialogs.CustomSelectRenderingForm, Abbey.Web"/>