Should the 'mydashboard' layout have a 'content' block region?

Should the 'mydashboard' layout have a 'content' block region?

by Gareth J Barnard -
Number of replies: 3
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello themers,

On CONTRIB-4827 for Elegance, Angelo Rigo has raised an interesting thought of adding the 'content' block region (which is a core fake region) to the 'mydashboard' layout in the config file of the theme.  This is so blocks can be set to that area as well as the content that Moodle adds in code.

What are your thoughts about this?  Should it be added to Essential (and other contributed themes) or is it something to be added to core 'base' and 'bootstrapbase'?

Cheers,

Gareth

Average of ratings: -
In reply to Gareth J Barnard

Re: Should the 'mydashboard' layout have a 'content' block region?

by Mary Evans -

It all depends on how the blocks are coded in JavaScript, I have lost count of what has happened to block regions. Perhaps it is time we rethought the structure of the block system altogether, then each page could have the block regions it needs.

But to answer your question Gareth, had you asked this in 2010 the answer would have been a resounding YES as there should have always been a REGION-CONTENT. Originally the layout as you may  remember had REGION-PRE and REGION-POST and REGION-MAIN which outlined the 3 column Holy Grail page layout which were ordered like so...

REGION-MAIN | REGION-PRE | REGION-POST

These worked like sliding doors and simple to grasp if you are good as visualizing abstract ideas, but a pain to style in reality without the original layout plan which I think has got mislaid with time.

Soon we had the class region-content, well that was because some of the content like blocks sat on top of REGION-PRE and REGION-POST so we needed a region-content class to keep things in order. Then we started to add padding to .region-content but region-content was used in other places, not just for region-pre and region-post it was used in region-main too. As thought that was not enough we got a PAGE-CONTENT now this is the real bug bear as this was perhaps the place that should have been given the title of REGION-CONTENT.

If we do go for REGION-CONTENT and I hope we do end up with something on those lines, then we really need to start to talk about a unified page layout that every one can use and understand.

So this gets +1 from me initially.

Sorry for the noise but I have been working on these layout a long time and my mind is elephant like.

Cheers

Mary

PS: I missed the last bit of your question Gareth.

I thought this region was already in mydashboard in Moodle 2.7 although it is added via JS.

Average of ratings:Useful (2)
In reply to Mary Evans

Re: Should the 'mydashboard' layout have a 'content' block region?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mary,

Thank you for your lengthy reply.  Indeed it is added by JS but you cannot add blocks to them when you configure them because the 'content' region is not listed.  However if it is added as a region for the 'mydashboard' layout in the config file, then you can (or implied in the tracker).

So the question still stands if this should be added to core base themes or left to contributed themes if desired?

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Should the 'mydashboard' layout have a 'content' block region?

by Mary Evans -

I don't really know the answer to that Gareth. I think I'd be tempted keep it in Contributed themes side as I think that the FAKE blocks, which are scattered far and wide in Moodle, really need removing before they add a  fixed REGION-CONTENT.

Cheers

Mary