Changing the registration

I'm guessing but does this line in the custom_index plugin index.php file...

$body = elgg_view_layout('custom_index', $params);

dictate that the page layout is definded by views/default/page/layouts/custom_index.php?

If so, how can I define a custom registration page?

  • Yes, you are guessing right. The custom_index plugin creates an index page with the layout defined in views/default/page/layouts/custom_index.php (and some data fetching for the page in index.php). The content of the index page is more or less the same regardless if you are not logged in or logged in with the exception of a login widget to be included in case you are not.

    For creating a separate index page when not logged in that includes less content (or only the login widget), you would need to override the index page in a separate plugin. For example my Loginrequired plugin does this (community.elgg.org/pg/plugins/project/804349/developer/iionly/elgg-18-login-required). The main point is to include a check if the user is logged in or not. In case the user is not logged in the separate index/login page is used. Otherwise the default index / custom_index page is displayed. The Loginrequired plugin does also implement some walled-garden mechanism you might not need but the rest of the code is quite similar to the custom_index plugin to create an index page.

  • @iionly... Thanks, I'm currently testing that plugin on another project and it seems to be spoton, but for this project I have defined the layout of custom_index to how I need it and I now need to define the the layout of the registration page and don't know where to do it.

  • Elgg1830/mod/MYPLUGIN/views/default/forms/register.php  customize to yr heartz content ;-P