This file contains hidden or 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 Sitecore.Analytics; | |
using Sitecore.Analytics.Data; | |
using Sitecore.Analytics.Tracking; | |
using Sitecore.Data; | |
namespace BlackTambourine.Core.Sitecore.Helpers | |
{ | |
public class PageEvents | |
{ | |
public static ID PageEventSearchId { get { return new ID("{0C179613-2073-41AB-992E-027D03D523BF}"); } } |
This file contains hidden or 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 void Example() | |
{ | |
//Get the personalised datasource of the "Call To Action" rendering in the "cta" placeholder of this particular "Landing Page" content item. | |
var landingPageItem = Sitecore.Context.Database.GetItem(landingPageId); | |
var renderingId = new ID("{3590F496-6D5F-4376-976D-208FCEFC15F3}"); //"Call To Action" View Renderings only | |
var placeHolderName = "cta"; | |
var itemList = GetPersonalisedPlaceHolderDatasourceItems(Sitecore.Context.Device, landingPageItem, placeHolderName, renderingId); |
This file contains hidden or 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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Sitecore.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Layouts; | |
using Sitecore.Rules; | |
using Sitecore.Rules.ConditionalRenderings; | |
namespace BlackTambourine.Core.Sitecore.Helpers |
This file contains hidden or 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 System; | |
using Sitecore.Mvc.Presentation; | |
namespace Diversus.Core.Sitecore.ViewRenderers | |
{ | |
/// <summary> | |
/// GlassView ViewRenderings require a datasource, gracefully handle when they do not (i.e. Sitecore will try to pass in a RenderingModel when no model is found). | |
/// Handles the error: "The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type XXXX" | |
/// </summary> | |
public class NoDatasourceSafeViewRenderer : ViewRenderer |
This file contains hidden or 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 System; | |
using Sitecore.Diagnostics; | |
using Sitecore.Mvc.Presentation; | |
namespace Diversus.Core.Sitecore.ViewRenderers | |
{ | |
public class ExceptionSafeViewRenderer : ViewRenderer | |
{ | |
/// <summary> | |
/// Handle any Exceptions in the mvc rendering. Also handles missing datasources. |
This file contains hidden or 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 Diversus.Core.Sitecore.ViewRenderers; | |
using Sitecore.Mvc.Extensions; | |
using Sitecore.Mvc.Pipelines.Response.GetRenderer; | |
using Sitecore.Mvc.Presentation; | |
namespace Diversus.Core.Sitecore.Pipeline | |
{ | |
public class GetViewRendererWithItemValidation : GetViewRenderer | |
{ | |
/// <summary> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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> | |
<sc.variable name="dataFolder" set:value="/App_Data" /> | |
<!--<pipelines> | |
<initialize> | |
<processor type="Sitecore.Azure.Startup.Pipelines.Loader.RebuildSearchIndex, Sitecore.Azure.Startup" patch:after="processor[@type='Sitecore.Pipelines.Loader.EnsureAnonymousUsers, Sitecore.Kernel']" /> | |
</initialize> | |
</pipelines>--> |
This file contains hidden or 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
/****** Analytics Rebuild "waiting to receive data" Step ******/ | |
INSERT INTO | |
[Sitecore_AnalyticsSecondary].[dbo].[CampaignActivityDefinitions] | |
SELECT * FROM [Sitecore_Analytics].[dbo].[CampaignActivityDefinitions] | |
INSERT INTO | |
[Sitecore_AnalyticsSecondary].[dbo].GoalDefinitions | |
SELECT * FROM [Sitecore_Analytics].[dbo].GoalDefinitions | |
INSERT INTO |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |