开发者

Displaying nodes inside a node with Drupal 6

I have a custom content type in Drupal 6 and one of it's fields is a node reference field. This field contains node ID's for a few nodes开发者_运维知识库 and i want to display those selected nodes after my node content. Any ideas how i can do that in the theme?


You can use the function node_load(NODE_ID) (c.f. documentation) to load the informations of a specific node, then theme('node', $node) to retrieve its themed output (but that step may be optional, depending on how you're using the node in your theme)


No coding is required for this.

You can alter the dislpay and the position of CCK elements.

Move your node reference field to the bottom of your fieldset and select full node view as the display.

Just make sure that you don't have this option on the referenced nodes otehrwise you could end up in an infinate loop.


Again without any custom coding you can use the Node Displays module to further customise the layout of a node independently of the admin form layout - http://drupal.org/project/nd

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜