论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
Stefan Ebonnek
How to display label-text within Template
2013年3月7日 上午2:47
答复

Stefan Ebonnek

等级: New Member

帖子: 2

加入日期: 2013年3月7日

最近的帖子

Hi there,

i have a structure which defines several fields.
We use '<entry name="label">' in the meta-data for displaying a field's title (to avoid the user sees cryptical variable names)

 1
 2root>
 3    <dynamic-element name="status" type="list" index-type="" repeatable="false">
 4        <meta-data>
 5                        [...]
 6            <entry name="label"><![CDATA[Status]]></entry>
 7        </meta-data>
 8        <dynamic-element name="new" type="New" index-type="" repeatable="false"></dynamic-element>
 9        <dynamic-element name="launched" type="Launched" index-type="" repeatable="false"></dynamic-element>
10        <dynamic-element name="closed" type="Closed" index-type="" repeatable="false"/>
11    </dynamic-element>
12...


Here is the problem:

I wrote a template which should display a tabulary summary of all fields.
How can I access the Meta-data "label" within a template?


1<table>
2<tr>
3    <td>Here I want to have the label text "Status"</td>
4    <td>$status.getData()</td>
5  </tr>
6</table>


(Liferay 6.1)
regards