Drupal 7 Drupal7显示内容问题
如何隐藏基本页面内容类型的特定字段?不是从管理窗格结构>内容类型>基本页面>管理显示。。我想将其隐藏在我的页面模板中,然后单独显示,以便我可以自定义它?在模板中,您可以使用来防止字段被呈现 下面是Garland主题节点模板的一个示例:Drupal 7 Drupal7显示内容问题,drupal-7,Drupal 7,如何隐藏基本页面内容类型的特定字段?不是从管理窗格结构>内容类型>基本页面>管理显示。。我想将其隐藏在我的页面模板中,然后单独显示,以便我可以自定义它?在模板中,您可以使用来防止字段被呈现 下面是Garland主题节点模板的一个示例: <div class="content clearfix"<?php print $content_attributes; ?>> <?php // We hide the comments and links
<div class="content clearfix"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
print render($content);
?>
</div>
<div class="clearfix">
<?php if (!empty($content['links'])): ?>
<div class="links"><?php print render($content['links']); ?></div>
<?php endif; ?>
<?php print render($content['comments']); ?>
</div>
Thanku@reallyxloco,但我通过使用以下代码获得了sol<代码>$body=field_get_items('node',$node,'body')代码>