The fastest easiest way to get it right.

The Default Page

Andromeda decides what page to show a user based on the parameter x6page, as in http://www.example.com?x6page=cart. However, when the user first lands on a site they have not specified a page yet, so there must be a way to send them to a meaningful page.

The x6home Page Method

Create a file in your application directory called 'x6home.php' and have it contain your home page content.

<?php
class x6home extends androX6 {
    function x6main() {
        echo "Welcome to the home page!"
    }
}
?>

Choosing a Page in Code

You can also code up a routine app_nopage() in your application/applib.php file. This function does not actually return a value, it sets a parameter:

<?php
# This file is application/applib.php
#
function app_nopage() {
    if(LoggedIn && !inGroup('customers')) {
        # this is an admin user, send them to the menu
        gpSet('x6page','menu');
    }
    else {
        # this is a public user, send them to the latest
        # news page
        gpSet('x6page','news');
    }
}

User Comments

There are no user comments yet on this page.


Add A Comment

Comments will not appear until after they are moderated. Comments are usually moderated within a few hours on weekdays, but may take longer on weekends and holidays.

Name or nickname: (This will appear with your comment)


Email (this will never be displayed)


Enter your comment here. Use [b] and [/b] for bold, [i] and [/i] for italic, and [pre] and [/pre] for code samples. All literal HTML and PHP that you enter will be escaped out and displayed as you enter it.


Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2010, Licensed under the GPL Version 2