简体   繁体   English

在SDL Tridion 2011 SP1中的Dreamweaver模板中添加参数

[英]Adding parameters in Dreamweaver Templates in SDL Tridion 2011 SP1

I learned about Custom parameters and expressions in Dreamweaver MX templates. 在Dreamweaver MX模板中了解了自定义参数和表达式。

So I tried adding them in my DWT TBB, like this. 所以我尝试在我的DWT TBB中添加它们,就像这样。

<!-- TemplateParam name="border" type="number" value="1" -->
@@border@@
<table>
  <tr>
    <td>@@(border)@@</td>
    <td><!-- #TemplateExpr expr="border" --></td>
  </tr>
</table>

But I am getting a blank output without any error. 但是我得到一个没有任何错误的空白输出。

I want to add variables to my Dreamweaver TBB and get their values. 我想将变量添加到我的Dreamweaver TBB并获取它们的值。 Can anyone suggest if there is any other approach? 任何人都可以建议是否有其他方法?

Unfortunately Tridion DWTs only share some syntax with the full Dreamweaver templates, so the above syntax will not work. 不幸的是,Tridion DWT只与完整的Dreamweaver模板共享一些语法,因此上述语法不起作用。

There is however a way to set variables, which is well documented here: 但是有一种设置变量的方法,这里有很好的记录:

http://www.tridiondeveloper.com/get-and-set-variables-in-dwts http://www.tridiondeveloper.com/get-and-set-variables-in-dwts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM