我正在修改Bartik来创建一个自定义主题。从我所看到的来看,我做的事情是对的,但它仍然不起作用。我已经清理缓存一百万次了,但仍然得到这些错误:
注意:未定义索引:department_column_left在include()(第191行)的/用户/斯科特/网站/HardwareNext/网站//主题/hn01/模板进行定制)。注意:include()中的未定义索引:department_content(第197行/用户/斯科特/网站/HardwareNext/网站//主题/hn01/模板进行定制)。注意:include()中的未定义索引:department_footer(第203行)/用户/斯科特/网站/HardwareNext/网站//主题/hn01/模板进行定制)。
任何帮助都将非常感激!
的 hn01.info 文件:
name = hn01
description = HN - Template 01
package = Core
version = VERSION
core = 7.x
stylesheets[all][] = css/layout.css
stylesheets[all][] = css/style.css
stylesheets[all][] = css/colors.css
stylesheets[print][] = css/print.css
regions[header] = Header
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom
regions[featured] = Featured
regions[content] = Content
regions[sidebar_first] = Sidebar first
regions[department_column_left] = Department column left
regions[department_content] = Department content
regions[department_footer] = Department footer
regions[footer_firstcolumn] = Footer first column
regions[footer_secondcolumn] = Footer second column
regions[footer_thirdcolumn] = Footer third column
regions[footer_fourthcolumn] = Footer fourth column
regions[footer] = Footer
settings[shortcut_module_link] = 0
; Information added by drupal.org packaging script on 2012-11-07
version = "7.17"
project = "drupal"
datestamp = "1352325357"
…下面是page.tpl.php文件中的相关代码:
<?php if ($page['department_column_left']): ?>
<div id="department-column-left" class="department-column-left"><div class="section">
<?php print render($page['department_column_left']); ?>
</div></div> <!-- /.section, /#department-column-left -->
<?php endif; ?>
<?php if ($page['department_content']): ?>
<div id="department-content" class="department-content"><div class="section">
<?php print render($page['department_content']); ?>
</div></div> <!-- /.section, /#department-content -->
<?php endif; ?>
<?php if ($page['department_footer']): ?>
<div id="department-footer" class="department-footer"><div class="section">
<?php print render($page['department_footer']); ?>
</div></div> <!-- /.section, /#department-footer -->
<?php endif; ?>
如果有什么需要我澄清的,请告诉我。我认为添加一个区域就像添加到.info文件然后修改page.tpl.php文件一样容易。还有别的吗?
提前感谢,
Scott。好吧,这是一个奇怪的
如我所说,在多次清除缓存后,我关闭了浏览器并重新打开了它。这并没有解决问题。所以,当我在流中等待答案时,我开始在管理菜单中导航。进入"配置"并调整了图像样式,更新后…
上面的错误就消失了。
我的新区域已经就位并且可用。我一早上都在用,没有任何不良反应。所以如果你遇到了我的问题——在你把那只鸡献给Drupal之神之前——试着进入一个区块,改变一些东西,然后保存它。