有没有办法根据物品的价值改变区域 header 的重音?

is there a way of changing the accent of a region's header according to the value of an item?

我想根据 :P4_COLOR 项的值设置区域 header 的 accent/backgroud-color。例如,如果 :P4_COLOR = blue 那么实际区域 header 的重音必须是蓝色的(即 u-color-1)。

我尝试在 h1 标签中使用 html backgroud-color,例如:

<h1 style="background-color:&P4_COLOR.;">Title name</h1>

但结果不等于模板选项。

有什么想法吗?

以下JavaScript将应用与模板选项相同的选项

$('#region_static_id').addClass('t-Region--accent1')

或者使用颜色修改器

$('#region_static_id .t-Region-header').addClass('u-color-9-bg') 

或者您可以在 Appearance-CSS 类 区域中提供重音作为替换字符串。