)가 요구되는 각 페이지 레이아웃 어레이. 모듈에 대한 예는 /theme/yourthemename/lang/en/theme_yourthemename.php에서
// Part of course, typical for modules - default page layout if $cm specifi
'incourse' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post', 'center-post'),
'defaultregion' => 'side-pre',
),
이 /theme/yourthemename/layout/general.php에서
$string['region-center-post'] = 'Center Bottom';
를 추가 'incourse'레이아웃에 추가 $의 hassidepost 후 상단
... 다음
$hascenterpost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('center-post', $OUTPUT));
를 추가 MAIN_CONTENT_TOKEN을 찾아서 추가
<div class="region-content"> <?php echo core_renderer::MAIN_CONTENT_TOKEN ?> </div>
// Add this
<?php if ($hascenterpost) { ?>
<div id="region-center-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('center-post'); ?>
</div>
</div>
<?php } ?>
// End of add this
<?php echo $coursecontentfooter; ?>
이제 모듈로 이동하여 모듈에 블록을 추가하면 블록을 가운데 하단으로 옮길 수 있습니다.