HTL语言,字符串连接和三元运算符

时间:2016-11-02 16:38:27

标签: adobe aem ternary-operator string-concatenation htl

我正在使用adobe AEM和HTL语言。我写的是:

${properties.hash ? [model1.href,properties.hash] @ join='#' : model1.href}

但不起作用。我认为这是一个语法问题..但我无法解决问题。

1 个答案:

答案 0 :(得分:1)

三元表达式中的

@join标记不是此处的有效标记。您可以将 ${properties.hash ? [model1.href,properties.hash] : model1.href @ join='#'} 移动到结束语。

@join

properties.hash不会影响简单的字符串,因为false sys.modulesdef add(): sys.modules.pop("add_coffee_record") import add_coffee_record

相关问题