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
private void FixUrlClaim() | |
{ | |
if (AmbientDataContext.CurrentClaimStore == null) | |
{ | |
throw new Exception("Ambient Data Framework is not configured. Check there is a cd_ambient_conf.xml file, and the AmbientFrameworkModule HttpModule is configured in web.config"); | |
} | |
var claims = AmbientDataContext.CurrentClaimStore.GetAll(); | |
var uri = new Uri("taf:request:full_url"); | |
//In order for Audience Manager to work, the ADF must contain a full_url claim with an actual Tridion page URL | |
// as it uses this to determine publication id and thus other configuration |
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 System; | |
using System.Collections.Generic; | |
using System.Runtime.Caching; | |
using Tridion.ContentManager.Templating; | |
namespace Tridion.Extensions.Templating | |
{ | |
/// <summary> | |
/// Extension methods on the Tridion.ContentManager.Templating.PublishingContext class to allow | |
/// for caching of arbitrary objects, package items and rendered output between |
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
<?xml version="1.0"?> | |
<Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge" | |
xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration" | |
xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions"> | |
<resources> | |
<cfg:groups /> | |
</resources> | |
<definitionfiles/> | |
<extensions> | |
<ext:editorextensions /> |
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
public override XmlTextReader ProcessResponse(XmlTextReader reader, PipelineContext context) | |
{ | |
var command = context.Parameters["command"] as String; | |
command = command.ToLower(); | |
if (command == "getpromotions" || command == "getregions") | |
{ | |
UserData currentUser = new CoreServiceHelper(System.Web.HttpContext.Current.User.Identity.Name).GetCurrentUser(); | |
if (currentUser.Privileges != 1) //Skip for Admins | |
{ | |
List<String> data = GetRegionPrefixesForUser(currentUser); |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Xml; | |
using System.Xml.Linq; | |
using Tridion.Web.UI.Core.Extensibility; | |
namespace SmartTargetGUIExtensions | |
{ |
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
<ComponentPresentations> | |
<ComponentPresentation IsRendered="true"> | |
<Component Id="tcm:100-10265" /> | |
<CodePage>65001</CodePage> | |
<Template Id="tcm:100-10119-32" Priority="200" Format="HTML Fragment" Title="Promotion - JSON" IsDynamic="false" /> | |
<RenderingMetadata> | |
<SmartTarget> | |
<Component path="\Building Blocks\Content\Banner\" tcmuripath="\tcm:100-13-2\tcm:100-19-2\tcm:100-122-2"> | |
<Keyword id="tcm:100-10445-1024" tcmuripath="\tcm:100-5390-512\tcm:100-10445-1024" titlepath="\Segment\Games" categoryId="tcm:100-5390-512" categoryTitle="Segment" categoryXmlName="Segment" /> | |
<Source> |
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
<ComponentPresentations> | |
<ComponentPresentation IsRendered="true"> | |
<Component Id="tcm:100-10265" /> | |
<CodePage>65001</CodePage> | |
<Template Id="tcm:100-10119-32" Priority="200" Format="HTML Fragment" Title="Promotion - JSON" IsDynamic="false" /> | |
<RenderingMetadata> | |
<SmartTarget> | |
<Component path="\Building Blocks\Content\Banner\" tcmuripath="\tcm:100-13-2\tcm:100-19-2\tcm:100-122-2"> | |
<Keyword id="tcm:100-10445-1024" tcmuripath="\tcm:100-5390-512\tcm:100-10445-1024" titlepath="\Segment\Games" categoryId="tcm:100-5390-512" categoryTitle="Segment" categoryXmlName="Segment" /> | |
<Source> |
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 System; | |
using System.Xml; | |
using Tridion.ContentManager.CommunicationManagement; | |
using Tridion.ContentManager.ContentManagement; | |
using Tridion.ContentManager.Publishing; | |
using Tridion.ContentManager.Publishing.Rendering; | |
using Tridion.ContentManager.Publishing.Resolving; | |
namespace Example.SmartTarget | |
{ |
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
// Load test HTML content client side | |
$( document).ready(function() { | |
loadContent("dynamic-test","/dynamic.htm"); | |
}); | |
//Load content from a URL into the specified HTML element | |
function loadContent(elementId,url) { | |
$("#" + elementId).load(url, function () { | |
startXpm("http://my-cms-url"); | |
}); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
Version="6.1" | |
xsi:noNamespaceSchemaLocation="../../schemas/cd_ambient_conf.xsd"> | |
<Cartridges> | |
<Cartridge File="cd_webservice_preview_cartridge.xml"/> | |
<Cartridge File="cwd_engine_cartridge_conf.xml"/> | |
<Cartridge File="smarttarget_cartridge_conf.xml"/> | |
<Cartridge File="session_cartridge_conf.xml"/> |