drupal-7 - 如何将我自己的自定义内容添加到 drupal 7 区域?

标签 drupal-7 drupal-theming

如果我想更改 $page['footer'] 页脚的内容,我应该在哪里更改它?我不是在谈论弄乱 .info 文件。我不知道为什么这么难找!

编辑:如果我在 page.tpl.php 文件上执行“print render($page['footer'])”,如何将 $page['footer'] 变量中的内容配置为我想要什么 html 吗?

最佳答案

你真的应该阅读一些基本的documentation 。页脚是一个 Drupal“区域”。区域中充满了 block 。

block #
The boxes visible in the regions of a Drupal website. Most blocks (e.g., recent forum topics) are generated on-the-fly by various Drupal modules, but they can be created in the administer blocks area of a Drupal site. See the documentation for more information on blocks.

region #
Defined areas of a page where content can be placed. Basic regions include: Header, Footer, Content, Left sidebar, Right Sidebar. Different themes can define different regions so the options are often different per-site. Content is assigned to regions via blocks. They can be ordered by weight within regions to define the order in which they display.

如果您想向页脚添加特殊的静态内容(例如版权声明、管理员电子邮件),您可以通过访问主页 » 管理 » 结构 » block (/admin/struct/block) 并单击“创建自定义 block ”添加 block ”(/admin/struct/block/add)。

如果您想在页脚中显示节点的内容,您可能需要使用 Node Blocks 。如果要显示多个节点的内容,可能需要使用 Views .

关于drupal-7 - 如何将我自己的自定义内容添加到 drupal 7 区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12084050/

相关文章:

升级到 Drupal 7 后出现 Javascript 错误

drupal - 习惯了 "traditional"模板的 CMS 开发人员如何学会如何喜欢 Drupal?

drupal - 无法让搜索框显示在自定义主题中

Drupal 7 hook_theme() 不加载模板文件

javascript - Drupal 表单 API #States

drupal - 使用多个选项按字段对 Drupal View 进行分组 - 仅显示一个字段

php - 显示上传的图片 - Drupal 7 Form API

drupal - 如何覆盖 Drupal 7 中已添加的元标记?

php - 如何在 Drupal 中获取当前页面的 URL?

css - Drupal 7 中的 Twitter Bootstrap 列未在 Safari 中排列