Changing index page to site page created with AnyPage plugin

By Kek

Hi,

I've created a site page called 'Home' using the AnyPage plugin so that it is easily editable by other content admins. It resides at /home.

I'd like to make it the default index page for the site. I've tried implementing the advice at http://docs.elgg.org/wiki/Tutorials/Indexpage, but since I'm not creating a custom index.php, it's not clear to me how to set the page created with AnyPage as the new front page. In other words, I don't know how to correctly modify the following line to do what I want:

if (!include_once(dirname(dirname(__FILE__)) . "/pluginname/pages/index.php"))
        return false;

I've fallen back to replacing it with forward('home') and returning false (if user is logged in), which accomplishes the desired end result of loading the 'Home' page, but using a 302 redirect like this doesn't seem ideal.

Any hints or suggestions?

Thanks!

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking