Confluence:模板中的用户宏

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

I wrote a user macro for Confluence 5.10.8,它将一个不可编辑的文本字段与一个复制按钮一起呈现。它有一个名为Text的参数,它的定义如下

## @param Text:title=Text|type=string|required=true|desc=The text to be displayed and copied 

现在我想在具有变量$foo的模板中使用此宏。如何将该变量用作我的用户宏参数Text的一部分?在参数中使用$foo引用它看起来与预览中的完全相同(参见下面的屏幕截图),即它呈现“$ foo”而不是其值。

enter image description here

confluence
1个回答
0
投票

看起来在宏参数中不可能使用模板变量。最后我删除了参数,现在正在使用正文中的模板变量。必须将正文处理设置为“渲染”。我不知道为什么,但它不适用于其他选项(Escaped,Unrendered)。

宏示例

enter image description here

模板示例

enter image description here

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