Updated feature: Upgrade frontpage customisability

Updated feature: Upgrade frontpage customisability

by Michael Gwynne -
Number of replies: 3

Hi,

I feel limited by the 6 or so options that I can select from in the frontpage settings. I see on GutHub that this settings page hasn't been updated in two years. I'm about to start an experiment to allow plugins for the front page which includes converting the core options into plugins. Once this is done, people can then write their own plugins/blocks/modules to appear in the centre of the front page.

First question, is this something people would be interested in? Or are you happy with the 6 present options? Or am I missing something that allows me to put custom information into the centre of the homepage?

Second question, where should the code for these go? I was thinking something along the following line:

  • Move frontpage and frontpageloggedin to their own setting page under "Front Page"
  • Move maxcategorydepth, frontpagecourselimit, newsitems and commentsperpage into settings pages for their own plugins.
  • Change the selectors for frontpage and frontpageloggedin to a selector similar to the text editor selector.
  • Put the code in a directory in /classes called frontpage in each directory or local/ directory and then in a single file for each 'module'. eg. /course/classes/frontpage/enrolledcourses.php or /local/myplugin/classes/frontpage/mymodule.php
  • Settings for these could go in a class in the same file I imagine.
  • I'll then render the html for these using a renderer so that they can be overridden in themes.

Does anyone see any problem with that? Or does anyone have anything to add?


Thanks,


Michael

Average of ratings: -
In reply to Michael Gwynne

Re: Updated feature: Upgrade frontpage customisability

by Michael Gwynne -

Or I suppose we could create a new directory in the base directory called frontpage.

In reply to Michael Gwynne

Re: Updated feature: Upgrade frontpage customisability

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It might be better to investigate using blocks instead of inventing a new plugin type - maybe the existing options just need converting to blocks (and possibly restricting them to only be selectable on the frontpage, if that is relevant).

This is how the configurable sections are done on the 'my home' (or 'dashboard') page and would have the benefit of being able to use many of the existing blocks in there.


Average of ratings: Useful (3)
In reply to Davo Smith

Re: Updated feature: Upgrade frontpage customisability

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

There are also already a number of themes that have custom block regions, so if these features were available as blocks they could be positioned in different ways. 

I think that's probably a better solution than a different type of plugin just for the front page.