基于时间的Sitecore个性化

问题描述 投票:0回答:1

我正在尝试根据服务器时间个性化站点核心内容。

我想在服务器时间晚上7点到8点之间显示不同的内容。

我已经使用以下规则尝试了日期字段,并且能够根据日期个性化内容:

where date [FieldName,,Enter Field Name,select Date] field [operatorid,Operator,,compares to] [Value,DateTime,,date]

但我想知道我是否也可以使用时间字段来做到这一点。

sitecore rule-engine sitecore-mvc personalization
1个回答
0
投票

要接受时间范围,请编写如下所示的自定义规则,并检查当前服务器时间是否在自定义规则代码中选定的时间范围内,

enter image description here

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.