Updated feature: Upgrade frontpage customisability

Updated feature: Upgrade frontpage customisability

di Michael Gwynne -
Numero di risposte: 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

Media dei voti:  -
In riposta a Michael Gwynne

Re: Updated feature: Upgrade frontpage customisability

di Davo Smith -
Immagine Core developers Immagine Particularly helpful Moodlers Immagine Peer reviewers Immagine 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.


In riposta a Davo Smith

Re: Updated feature: Upgrade frontpage customisability

di Richard Oelmann -
Immagine Core developers Immagine Particularly helpful Moodlers Immagine Plugin developers Immagine 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.