Page Views

Click on links to change page view

PHP/HTML Source:


class MyPage extends RaxanWebPage {

    protected function _config() {
        $this->masterTemplate = 'views/master.homepage.html';

    // -- View handlers

    protected function _indexView() {

    protected function _helpView() {

    protected function _thankyouView() {

    protected function _signupView() {
        $this->preserveFormContent = true;

    protected function _switcherView() {
        // redirect to the help view

    // -- Event handlers

    protected function signup($e){
        $name = $this->post->textVal('name');
        // we're in ajax mode so let's use the C() function
        if (!$name) $this->flashmsg('Sign up Error. Please enter a name.','fade','rax-box error');
        else $this->redirectToView ('thankyou'); // redirect to the thankyou view



<div class="container append-bottom">
    <div class="pad round border2">
       <a href="pageview.php">Home</a>
     | <a href="pageview.php?vu=signup">Sign Up</a>
     | <a href="pageview.php?vu=switcher">Switch To Help...</a>

Plugin Source:

HTML/JavaScript Source (views/pageview.signup-form.html):
<style type="text/css">
    label { display:block; float:left;width:120px }
<div class="container c35">
    <h2>Sign up</h2>
    <form id="form1" class="c20" method="post">
            <legend>Sign up form</legend>
                <div class="flashmsg bmm"></div>
                <div class="ctrl-group">
                    <label>User name:</label><input type="text" name="name" class="textbox c10" />
                <div class="ctrl-group">
                    <label>Password:</label><input type="password" name="password" class="textbox c10" />
                <div class="ctrl-group">
                    <label>Retype Password:</label><input type="password" name="cpassword" class="textbox c10" />
                <div class="ctrl-group">
                    <label>Email:</label><input type="text" name="email" class="textbox c10" />
                <div class="ctrl-group">
                    <label>Website:</label><input type="text" name="website" class="textbox c10" />
                <hr />
                <input type="submit" value="Submit" xt-bind="click,signup"/>

Data Source: