Skip to content

Instantly share code, notes, and snippets.

View trnktms's full-sized avatar
:octocat:

Tamás Tárnok trnktms

:octocat:
View GitHub Profile
public static HtmlString RenderPersonalizationRuleHightlight<T>(this HtmlHelper<T> htmlHelper)
{
var result = new MvcHtmlString(string.Empty);
if (!Sitecore.Context.PageMode.IsExperienceEditor)
{
return result;
}
var sitecore = htmlHelper.Sitecore();
<div>
@Html.RenderPersonalizationRuleHightlight()
</div>
<?xml version="1.0" encoding="utf-8" ?>
<!--
Purpose: This include file configures the processing subsystem of the Sitecore CEP.
You should disable this file in case the current server does not need to perform processing tasks, such as executing scheduled Sitecore tasks.
To disable the file, you can rename it so that it has a ".disabled" extension.
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<myOwnCustomLuceneIndexConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider">
<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch">
<fieldNames hint="raw:AddFieldByFieldName">
<field fieldName="MyOwnField" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
<analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<myOwnCustomLuceneIndexConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider">
<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch">
<fieldNames hint="raw:AddFieldByFieldName">
<field fieldName="MyOwnField" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
<analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
using System;
using System.Data;
using Sitecore.Data;
using Sitecore.Data.Items;
namespace Sitecore.SharedSource.DataImporter.Providers
{
public class CustomSqlDataMap : Sitecore.SharedSource.DataImporter.Providers.SqlDataMap
{
public CustomSqlDataMap(Database db, string connectionString, Item importItem)
using System;
using System.IO;
using Sitecore.Data.Items;
using Sitecore.Resources.Media;
using Sitecore.SharedSource.DataImporter.Mappings.Fields;
using Sitecore.SharedSource.DataImporter.Providers;
namespace Sitecore.SharedSource.DataImporter.Mappings.Fields
{
public class ToMedia : ToText
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.UI;
using Sitecore;
using Sitecore.Diagnostics;
using Sitecore.Shell.Applications.ContentEditor;
using Sitecore.Text;
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<controlSources>
<source mode="on" namespace="Sitecore.Foundation.Fields.ContentEditor.Controls" assembly="Sitecore.Foundation.Fields" prefix="custom" />
</controlSources>
</sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpRequestBegin>
<processor patch:before="*[@type='Sitecore.Pipelines.HttpRequest.QueryStringResolver, Sitecore.Kernel']"
type="1"
factory="ContainerFactory"
ref="MyProject.MyPageResolver, MyProject"/>
</httpRequestBegin>
</pipelines>