Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

html

css

php

moodle

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.

like image 680
surya Avatar asked Feb 07 '13 10:02

surya


1 Answers

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

like image 159
Jitendra Gaur Avatar answered Oct 15 '22 07:10

Jitendra Gaur