Skip to content

Instantly share code, notes, and snippets.

View NaibafCH's full-sized avatar

Fabian Geiger NaibafCH

  • Namics AG
  • Switzerland
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<services>
<configurator type="Sitecore.Foundation.Channels.DI.ServicesConfigurator, Sitecore.Foundation.Channels"/>
</services>
<pipelines>
<determineInteractionChannel>
<!-- Determines the social channels for the interaction. The social channels to be determined are listed at the social/interactionChannelMappings configuration. -->
<processor type="Sitecore.Foundation.Channels.Pipelines.DetermineInteractionChannel.SocialChannels, Sitecore.Foundation.Channels"
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<sitecore>
<pipelines>
<determineInteractionChannel>
<processor type="Sitecore.Analytics.OmniChannel.Pipelines.DetermineInteractionChannel.ReferringSite, Sitecore.Analytics.OmniChannel"
patch:after="processor[@type='Sitecore.Analytics.OmniChannel.Pipelines.DetermineInteractionChannel.DefaultChannel, Sitecore.Analytics.OmniChannel']">
<param desc="channelId">{44DD9FF5-44B2-4C59-8DF8-849E400F4B6B}</param>
</processor>
</determineInteractionChannel>
<%@ Page Language="C#" AutoEventWireup="true" Debug="true" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="Sitecore" %>
<%@ Import Namespace="Sitecore.Configuration" %>
<%@ Import Namespace="Sitecore.Data" %>
<%@ Import Namespace="Sitecore.Data.Fields" %>
<%@ Import Namespace="Sitecore.Data.Items" %>
<%@ Import Namespace="Sitecore.Globalization" %>
<%@ Import Namespace="Sitecore.Layouts" %>
using System.Collections.Generic;
using System.Linq;
using Sitecore.Configuration;
using Sitecore.Data.Managers;
using Sitecore.Diagnostics;
using Sitecore.Globalization;
using Sitecore.Pipelines.HttpRequest;
using Sitecore.Web;
using Sitecore.Sites;
<div class="tabs-container">
<ul>
@foreach (var tab in Model.TabItems)
{
<li>@tab.Title</li>
}
</ul>
@foreach (var tab in Model.TabItems)
{
<div>
<div class="tabs-container">
<ul>
@foreach (var tab in Model.TabItems)
{
<li>@tab.Title</li>
}
</ul>
@{
int i = 0;
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<mvc.getDynamicPlaceholderKeys>
<processor patch:after="*[@type='Sitecore.Mvc.Pipelines.Response.GetDynamicPlaceholderKeys.GetUniqueKeysWithinRendering, Sitecore.Mvc']" type="Foundation.DynamicPlaceholder.Pipelines.GetDynamicPlaceholderKeys.GetUniqueIdKeyWithinRendering, Foundation.DynamicPlaceholder" />
</mvc.getDynamicPlaceholderKeys>
<mvc.getDynamicPlaceholderInitialKey>
<processor patch:instead="*[@type='Sitecore.Mvc.Pipelines.Response.GetDynamicPlaceholderInitialKey.RemovePlaceholderUniqueKeySuffix, Sitecore.Mvc']" type="Foundation.DynamicPlaceholder.Pipelines.GetDynamicPlaceholderInitialKey.RemovePlaceholderUniqueKeySuffixWithCountOrId, Foundation.DynamicPlaceholder" />
</mvc.getDynamicPlaceholderInitialKey>
using Sitecore.Mvc.Pipelines.Response.GetDynamicPlaceholderKeys;
namespace Foundation.DynamicPlaceholder.Pipelines.GetDynamicPlaceholderKeys
{
public class GetUniqueIdKeyWithinRendering : GetDynamicPlaceholderKeysProcessor
{
public static readonly string RenderingParameterKey = "GetUniqueIdKeyWithinRendering";
public override void Process(GetDynamicPlaceholderKeysArgs args)
{
using System.Text.RegularExpressions;
using Sitecore.Mvc.Pipelines.Response.GetDynamicPlaceholderInitialKey;
namespace Foundation.DynamicPlaceholder.Pipelines.GetDynamicPlaceholderInitialKey
{
public class RemovePlaceholderUniqueKeySuffixWithCountOrId : RemovePlaceholderUniqueKeySuffix
{
private static readonly Regex DynamicPartMatcherWithId =
new Regex("-{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}}-([0-9]+|{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}})$", RegexOptions.Compiled);
using System.Web;
using Foundation.DynamicPlaceholder.Pipelines.GetDynamicPlaceholderKeys;
using Sitecore.Data;
using Sitecore.Diagnostics;
using Sitecore.Mvc.Helpers;
using Sitecore.Mvc.Presentation;
namespace Foundation.DynamicPlaceholder.Helpers
{
public static class SitecoreHelperExtension