简体   繁体   中英

How to define a custom block regions in moodle theme designing?

I am trying to design a new theme, that having side-pre region and bottom region . In this bottom region(From left to right) I have to add 4 blocks side by side. Please help me, how to define the region(area, location) and in which files I have to modify.

Thanks.

You can set your custom region in theme/config.php file, for example -

'course' => array(
        'file' => 'general_layout.php',
        'regions' => array('side-pre', 'bottom-region' ),
        'defaultregion' => 'side-pre',
        'options' => array('langmenu' => true),
    ),

And define region in layout file theme/layout/yourlayout.php

<div id="region-pre" class="block-region">
   <div class="region-content">
       <?php echo $OUTPUT->blocks_for_region('bottom-region') ?>
   </div>
</div>

For more detail look into moodle doc - http://docs.moodle.org/dev/Themes_2.0

在主题选择器中,您可以选择您喜欢的主题,例如.... 网站管理 - >外观 - >主题 - >主题选择器

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM