문제 설명
새로운 영역 생성 ‑ Drupal 7에서 기쁨이 없음 (Creating New Region ‑ No Joy in Drupal 7)
맞춤 테마를 만들기 위해 Bartik을 수정하고 있습니다. 내가 읽은 모든 것에서 나는 일을 올바르게하고 있지만 여전히 작동하지 않습니다. 캐시를 백만 번 삭제했지만 여전히 다음 오류가 발생합니다.
주의: 정의되지 않은 인덱스: department_column_left in include() (/Users/scott/Sites/HardwareNext/sites/의 191번째 줄) all/themes/hn01/templates/page.tpl.php). 알림: 정의되지 않은 인덱스: include()의 department_content(/Users/scott/Sites/HardwareNext/sites/all/themes/hn01/templates/page.tpl.php의 197행). 알림: 정의되지 않은 인덱스: include()의 department_footer(/Users/scott/Sites/HardwareNext/sites/all/themes/hn01/templates/page.tpl.php의 203행).
도움을 주시면 감사하겠습니다!
여기 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</의 관련 코드가 있습니다. strong> 파일:
<?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.
지역 추가는 .info 파일에 추가한 다음 page.tpl.php 파일을 수정하는 것만 큼 쉽다고 생각했습니다. 더 있나요?감사합니다,
Scott.
지역 추가는 .info 파일에 추가한 다음 page.tpl.php 파일을 수정하는 것만 큼 쉽다고 생각했습니다. 더 있나요?감사합니다,
Scott.
참조 솔루션
방법 1:
OK, this was a weird one.
After clearing the cache numerous times, as I said, I closed the browser and reopened it. That did not fix the problem.
So, while I waiting for an answer here on the 'flow, I started navigating about in the admin menu. Went to "Configuration" and tweaked a image style and after I updated it ...
the errors above simply went away.
My new regions are in place and available. I've been using them all morning with no ill effects. So if you're confronted with my problem‑‑before you sacrifice that chicken to the gods of Drupal‑‑try going into a block, change something and then save it. It just may save your keyboard from a bloody chicken.