且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Sitecore DMS中触发配置文件?

更新时间:2022-12-06 14:38:10

我已收到Sitecore支持部门对此问题的答复。这就是:

"如果您使用模式卡进行个性化,则可以使用以下代码作为下拉列表的"Item Selected"事件的事件处理程序:"

var profile = Sitecore.Analytics.Tracker.CurrentVisit.GetOrCreateProfile("<Profile Name>");
profile.BeginEdit();
profile.Score("<profile key>",<profile key value you want to set>);
profile.Score("<profile key>",<profile key value you want to set>);
profile.UpdatePattern(); //sets the appropriate pattern based on the current profile keys values you have just set.
profile.EndEdit();

这会干扰自动配置文件匹配,因此我不确定是否要使用此方法。