1
我一直在模塊中使用XML Field模塊,如下所示。如何在drupal7中顯示使用xml_field模塊創建的字段的標題?
我已經創建了一個類型爲xml的字段的實體類型。
我已設置此字段以接受多個值。例如,我的實體看起來如下所示。
Entity (item description, body, Metadata(this is xml field with multiple value))
with data --> Item1 ('This is item 1', 'this is body', (
(
<page>
<title>metadata item 1</title>
<description>this is item 1</description>
</page>
)
(
<page>
<title>metadata item 2</title>
<description>this is item 2</description>
</page>
)
)
現在在字段Metatdata中,我看不到每個XML數據節點的標題。
根據模塊標題必須使用 hook_node_view_alter()
顯示,但由於最近我已經開始模塊開發,所以我無法實現此鉤子。元數據的
願望輸出爲:
**Metadata(xml):**
metadata item 1: (<--- how to display these titles??)
This is item 1
metadata item 2: (<--- how to display these titles??)
This is item 2