【问题标题】:Display hyperlink in <td> based on condition in google sitebricks根据 google sitebricks 中的条件在 <td> 中显示超链接
【发布时间】:2011-09-16 02:58:33
【问题描述】:

我正在使用 Google Sitebricks 开发用户界面。

我有一个使用@repeat 注释显示的表格

@Repeat(items=regusers, var="reguser")

<tr>
<td><a href="/something/${reguser.userId}">${reguser.userId}</a></td>
<td>${reguser.userRegAt}</td>      
</tr>

我有一个“状态”变量。基于这个值我想在第一列切换锚标记的显示

能否请您指出一个解决方案。

谢谢。 .

【问题讨论】:

    标签: javascript jquery html sitebricks


    【解决方案1】:

    请尝试以下方法

    <tr>
    
    @ShowIf(status)
    <td><a href="/something/${reguser.userId}">${reguser.userId}</a></td>
    
    <td>${reguser.userRegAt}</td>
    </tr> 
    

    【讨论】:

      猜你喜欢
      • 2018-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多