MOODLE :: Calling block content

MOODLE :: Calling block content

by Lavanya Manne -
Number of replies: 0
Picture of Plugin developers

I had 4 div's(left, right, bottom, bottom) displaying on the custom page. I want to add different blocks to these 4 div's

    ex: left-side div :: block_login
    ex: right-side div :: block_chat
    ex: bottom div1 :: noticeboard block
    ex: bottom div2 :: calendar block

Can we call a particular block in these different div's in moodle.

I tried with the syntax ::

    <div style="float:left;"><?php echo $PAGE->blocks->region_has_content('block_login', $OUTPUT); ?></div>
   
    <div style="float:left;"><?php echo $PAGE->blocks->region_has_content('block_chat', $OUTPUT); ?></div>
   
    <div style="float:left;"><?php echo $PAGE->blocks->region_has_content('block_discussion', $OUTPUT); ?></div>
   
    <div style="float:left;"><?php echo $PAGE->blocks->region_has_content('block_calendar', $OUTPUT); ?></div>


Average of ratings: -