1
我正在使用adobe AEM和HTL语言。我正在写这样的东西:HTL语言,字符串连接和三元运算符
${properties.hash ? [model1.href,properties.hash] @ join='#' : model1.href}
但是不起作用。我认为这是一个语法问题..但我无法解决问题。
我正在使用adobe AEM和HTL语言。我正在写这样的东西:HTL语言,字符串连接和三元运算符
${properties.hash ? [model1.href,properties.hash] @ join='#' : model1.href}
但是不起作用。我认为这是一个语法问题..但我无法解决问题。
@
三元表达式中的令牌在此处不是有效的令牌。您可以将@join
移至表达式结尾。
${properties.hash ? [model1.href,properties.hash] : model1.href @ join='#'}
@join
不影响简单的字符串,叶,因为它是,这情况下,如果properties.hash
是false