Homepage CMS v1.2

Release Notes

- moved hardcoded style to css class- more sensible view handling - view location got cached and caused issues- more sensible css logic


Known bugs:

- please note that the free_html widget is sometimes flakey due to problems with tinymce and dynamic content.  If it's not working, move the widget to a wide column and refresh the page.

Also note - widget manager has a setting to allow Admins to submit unfiltered HTML in the free_html widget

  • No one is working on upgrading it that I know of, right now my efforts are going toward the community plugins, and my next project is spam_login_filter. 

  • ok, i may look at it soon as it is one i need to upgrade before i can upgrade my live site to 1.9.

  • @Ura Soul thank you very much ! :-)

  • i just looked at this with elgg 1.9. essentially the browser is forwarded to the activity page whenever the homepage is accessed. i put some debug code into the start.php file for homepage_cms and found that this plugin hook handler does not appear to be being run:

    elgg_register_plugin_hook_handler('view', 'page/layouts/one_column', 'homepage_cms_view_hook');

    though i don't know why. any tips/thoughts?

  • 1.9 introduced the null pagehandler, so instead of having a custom plugin hook to provide the home page we now use the standard route hooks with '' as the first argument


    Other thoughts: this probably needs a complete rewrite from scratch, it was pretty experimental when I did it the first time, I wouldn't be happy with just a compatibility fix.

  • so i would need to register a pagehandler instead of use the plugin hook and then check the context of the current page within the hook? e.g.


    i agree that the plugin needs to be revamped, however, i am wanting to get a compatibility fix in place, since i am not able to upgrade to 1.9 without this plugin and you already said you have no ETA for it.

  • no, something like this

    elgg_register_plugin_hook_handler('route', '', 'homepage_router');

  • oh ok - i just used that command, but as far as i can see, the hook isn't being triggered (at least the code i have put in the route hook isn't being executed).

    i looked at the docs for elgg, but didn't find anything useful for route hooks (http://learn.elgg.org/en/1.9/guides/hooks-list.html?highlight=hook#views). the routing page is empty.

    i did already use the route hook in another plugin, though for some reasons the same approach i used there is not resulting in the expected result in 1.9.

  • I'm just going off straight memory at the moment, but when in doubt, see how core does it: https://github.com/Elgg/Elgg/blob/1.9/mod/custom_index/start.php#L15

  • ah, well, on that linked page the function being used is:


    so i will look at using that, thanks

  • i got the page to render using that handler type.. though i'm not 100% sure exactly how the views are intended to interact together. the widget lightbox appears to be showing the standard widget manager list, rather than the homepage cms list, though my debugging of that view has not yielded a solution for that yet.
    i just thought to let you know, in case you have any thoughts to add.

  • Disable the widget manager option to manage the homepage?

  • hmm.. i'm not seeing that option. there is only the option to use widget manager's homepage - which is set to 'no'.
    the 'layout/widgets' view in your plugin contains a relevant check, but if i add a test dump/echo line to that file then it is not rendered, so i'm not sure the view is being executed:

    if (elgg_get_context() == 'index') {
      echo elgg_view('page/layouts/homepage_widgets', $vars);
    else {
      echo elgg_view('page/layouts/widget_manager_widgets', $vars);

  • I don't remember, I wrote this code over 2 years ago and never looked at it again or even used the plugin.  You'll have to dig in and figure it out on your own until I find the time and inspiration to look at it again.

  • sure ok. well, there's another issue where the admin settings just don't save. an error is produced in the admin panel that 'There was a problem saving settings for the Homepage CMS plugin.'... however, nothing is shown in logs and even after re-writing the settings page, the issue is not fixed. strangey!

  • oh, so i updated the manifest for the plugin to require 1.9 and now the settings save correctly.

  • @Ura Soul, so now it works fine ?

  • that part does, but the widgets are not being saved and rendered on the page. i think this is the last issue to resolve.

  • having debugged this a little, i see that the widgets are not being added to the page's widget list when they are clicked in the 'add widgets' panel. i looked through the changes list for widget manager's latest version and didn't see any obvious changes that might be affecting this. so i am wondering if there has been a change to the way that widgets are added to pages in 1.9+.

    anyone know?

  • Not that I'm aware of.  I think this plugin leaned on the widget manager index widgets stuff a lot, it may be that their code has changed with the 1.9 compatible version of widget manager and it's just not interacting the same.

  • any update on an upgraded version of this code matt?

    i'm moving to get my site upgraded from 1.8 to 1.11 and still use this plugin. if there's no upgrade for it soon i will most likely stop using it and make my own custom homepage. thanks

Matt Beckett

I'm a self-employed web developer, family man, nerd, scuba diver. Manager/maintainer of this elgg community site, and core Elgg development team member.

Project Info


  • Category: Themes
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 6489
  • Recommendations: 40

Other Projects

View Matt Beckett's plugins