3

I have added 4 blocks in course page at center post (Bottom portion of the page) region per particular subject.

These 4 blocks are positioned at center post using Pagelayout.css. When I manually add them their position is correct (Using GUI i.e Add block).

When I am changed/selected different subject (Course), then these blocks are appearing in Side-pre region.

But I want to get these 4 blocks in center post irrespective of the subject. (i.e independent of the subject, these 4 blocks should be in center post region).

I added the line:

$CFG->defaultblocks_topics   = 'news_items,search_forums,blog_recent,online_users';

in moodle/config.php.

So I am getting these 4 blocks in all courses, but these are coming/appearing in Side-pre. So, how to get these 4 blocks in center post region and Navigation block should be at side-pre region only? Actually I want like

enter image description here But currently, these blocks appearing in side-pre region like

enter image description here

How can I get blocks in center-post like in first image?

surya
  • 287
  • 1
  • 6
  • 14

2 Answers2

1

You can add your code in your theme files (/theme/your_themename/general.php)

<!-- main mandatory content of the moodle page  -->
    <div id="region-main-wrap">
        <div id="region-main">
            <div class="region-content">
                <?php echo $OUTPUT->main_content() ?>

                    *Add your code here*

            </div>
        </div>
    </div>
<!-- end of main mandatory content of the moodle page -->

It will be displayed on every page in the main div.

0

You can do that by creating a layout file for course page and creating a main/center region for the blocks to be placed in.

Please have a look at the below mentioned link for complete explanation:

https://moodle.org/mod/forum/discuss.php?d=160567

If you need further explanation, just ask.

Cheers

Sandeep

Sandeep Gill
  • 573
  • 4
  • 5
  • Hai Sandeep, I got center post region and I added blocks in center post region. But by changing the subject these blocks whichever I added are not getting into the center-post region and some other blocks are appearing(Those are not added by me) in center post. To over come this problem I added above mentioned code. By adding that code I am not getting any other blocks other than above mentioned blocks. But unfortunately these blocks are appearing in **side-pre** plz can any one help me to how to get the above mentioned blocks in **center-post** . Thanks – surya Mar 11 '13 at 06:47
  • Hi Surya, can you add an image of what is currently happening and how do you want it to look, may be that way I can have a look and provide you a mockup. – Sandeep Gill Mar 17 '13 at 03:49
  • Hi Sandeep, I added images to my question. Thanks. – surya Mar 18 '13 at 10:24