我正在寻找一种方法来拆分$ content变量,并利用其内容。下面是我使用print_r($node)
命令查看Drupal如何创建$content
变量时获得的代码示例。我应该如何安排描述,以便我可以将其作为变量输出,而不是图像?感谢大家的慷慨帮助!
[content] => Array
(
[#content_extra_fields] => Array
(
[subscriptions_ui] => Array
(
[label] => Subscribe
[description] => Subscriptions UI module form.
[weight] => 100
)
[title] => Array
(
[label] => Title
[description] => Node module form.
[weight] => -5
)
[body_field] => Array
(
[label] => Body
[description] => Node module form.
[weight] => 0
[view] => body
)
[revision_information] => Array
(
[label] => Revision information
[description] => Node module form.
[weight] => 20
)
[author] => Array
(
[label] => Authoring information
[description] => Node module form.
[weight] => 20
)
[options] => Array
(
[label] => Publishing options
[description] => Node module form.
[weight] => 25
)
[comment_settings] => Array
(
[label] => Comment settings
[description] => Comment module form.
[weight] => 30
)
[menu] => Array
(
[label] => Menu settings
[description] => Menu module form.
[weight] => -2
)
[path] => Array
(
[label] => Path settings
[description] => Path module form.
[weight] => 30
)
[attachments] => Array
(
[label] => File attachments
[description] => Upload module form.
[weight] => 30
[view] => files
)
[path_redirect] => Array
(
[label] => URL redirects
[description] => Path redirect module listing
[weight] => 30
)
)
[#pre_render] => Array
(
[0] => content_alter_extra_weights
)
[body] => Array
(
[#weight] => 0
[#value] =>