如何在Sitecore DMS中触发配置文件? [英] How do I trigger a profile in Sitecore DMS?
本文介绍了如何在Sitecore DMS中触发配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一种允许访问者选择他们希望在网站上显示的内容的方法。
有没有办法在Sitecore DMS中以编程方式触发配置文件?
我已经查看了有关SDN(http://sdn.sitecore.net/Reference/Sitecore 6/DMS Documentation.aspx)的相关文档,但到目前为止还没有找到方法。
编辑:在Sitecore支持门户上提出此问题-一旦我发现更多信息,将发布答案。
推荐答案
我已收到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();
这会干扰自动配置文件匹配,因此我不确定是否要使用此方法。
这篇关于如何在Sitecore DMS中触发配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文