1 Column Theme

1 Column Theme

par Dan Humpherson,
Nombre de réponses : 14
I'm in the process of creating a Moodle Theme where the page layout will only ever have the left hand column, can any suggest potential pit falls or things I should look out for?

E.g. The add block menu appears in the right hand column so how is this best handled?
Moyenne des évaluations: -
En réponse à Dan Humpherson

Re: 1 Column Theme

par Patrick Malley,
Hello Dan,

This would actually be a 2-column theme. One column containing your main content, and another column containing your sideblocks. I don't recommend using a left-column only hack. In fact, I don't recommend using a right-column only hack either. I think that since Moodle doesn't natively support themers to make this decision, then we shouldn't really hack things just to make it happen.

More specifically, though, if you were to hide the right column from your users, you would have to display it to your teachers when editing is turned on so that they could see the blocks menu. This would be quite confusing since Moodle would still allow them to place their sideblocks in the right column. They might place something there and then wonder why it can't be viewed when they turn editing off.

Furthermore, I believe that the "Turn Editing On" link is in the right column on the front page. So, if you were to hide that column, you would lock yourself out from editing that page.

To do this really is a hack.
En réponse à Patrick Malley

Re: 1 Column Theme

par Joseph Rézeau,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers Avatar Translators
Furthermore, I believe that the "Turn Editing On" link is in the right column on the front page. So, if you were to hide that column, you would lock yourself out from editing that page.

No problem, you would still have the Turn editing on button available (see screenshot). Other than that I totally agree that you cannot have a one-column only theme in Moodle. On the other hand I personally dislike the 3-column layout and much prefer a 2-column layout.

Joseph


Annexe image00.jpg
En réponse à Joseph Rézeau

Re: 1 Column Theme

par Patrick Malley,
I agree, Joseph. I too would like to see natively supported two-column themes. Tim's work on templates, blocks, and navigation should allow theme developers to designate only one sideblock column on the right or left.
En réponse à Patrick Malley

Re: 1 Column Theme

par Dan Humpherson,
I have managed to change (Hack) the code so that Moodle loads the 'Add..' block menu on the left hand column only and adds new blocks to the left hand column only.

I have also changed (Hacked) the moodle code so that the 'Turn editing on' button on the front page is displayed in the left hand column.

Further to this I have hidden the icon to move a block to the right.

Next I'll be editing the default block layout settings so that all 'default' moodle blocks appear on the left hand side.

http://docs.moodle.org/en/Block_layout

Hope to release the code back to everyone soon!

Edit: I have also set the #right-column to display: none;
En réponse à Dan Humpherson

Re: 1 Column Theme

par Joseph Rézeau,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers Avatar Translators

Hi Dan,

I do not see the necessity to hack the Moodle code to achieve a 2-column display. It can be achieved entirely through your theme's CSS stylesheet. There are a few (very few) 2-column themes in the Themes repository (including my own orangechoc theme, a little outdated now).

Unless, of course, you need to force all teachers on your Moodle site to use a 2 column display with the blocks in the left column.

Joseph

En réponse à Joseph Rézeau

Re: 1 Column Theme

par Dan Humpherson,
Thats the idea behind the theme, or the requested theme design - It must only have a left-column and the central column for the main content. Im forcing the theme to only be able to use the left-column

Right column is easier because you dont have to move the add block menu or the turn editing on button on the front page so I can see how the OrangeChoc theme could easily be done in CSS.



En réponse à Dan Humpherson

Re: 1 Column Theme

par John Shaver,
Hello Dan,

Could you post the change (hack) for moving the "Add Blocks" to the left column? Have spent the last few hours and had no luck..
En réponse à Dan Humpherson

Re: 1 Column Theme

par Stephen Years,
Hi Dan,

I'm doing almost the exact same thing as you. I have managed to move the 'Turn editing on' button to the left, but could you give me a pointer on how to move the 'Add block" menu form the right column to the left column?

Thanks,

Steve Years
En réponse à Dan Humpherson

Re: 1 Column Theme

par Frank Ralf,
Hi Dan,

have you tried just moving all your blocks over to the left side? However, I don't know how the right column is rendered if it is void of any blocks.

hth
Frank
En réponse à Frank Ralf

Re: 1 Column Theme

par Frank Ralf,
Does seem to work, see screenshot. And the "Turn editing on" button's still there clin d’œil

Frank
Annexe All_blocks_left.png
En réponse à Frank Ralf

Re: 1 Column Theme

par Patrick Malley,
Right. The "Turn Editing On" button is in the navbar on course pages. It is in the right column on the front page (where there is no navbar).

Also, there is not "Turn Editing On" link in the front page admin menu.
En réponse à Dan Humpherson

Re: 1 Column Theme

par James Jameson,

This forum seems to know quite a lot about editing themes and I was wondering if you could possibly give me some help.

I am using the "theme with automatic Menus bar", by "Chen ZhongWei" and was wondering if anyone had any guidance as to how to resolve a couple of issues that (being a moodle novice) are probably easy to resolve with some help .
These issues are:

Issue 1 - How to change the colour of both the static and hover links on the breadcrumb menu?

Issue 2 - Which css allows you to edit the orange line just above the footer image?

Issue 3 - I have managed to change the alternative text for the icons but I cannot change the alternative text for the logo (it still states faculty of Computer and Information).

Issue 4 - How do I move the logo so it sits at the very left hand edge of the page?

Thank you for your time in this matter.

Alex

En réponse à James Jameson

Re: 1 Column Theme

par Joseph Rézeau,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers Avatar Translators
Hi Alex,
Please post a new discussion topic in this Themes forum for your questions which are not related to the current discussion (basic forum netiquettewink).
Joseph

Annexe image00.jpg