Creating my first Page

Discussion in 'Integration' started by dazzafact, May 26, 2015.

  1. dazzafact

    dazzafact New Member

    Joined:
    May 19, 2015
    Messages:
    14
    Hello,
    i want to create a simple new Page with access for everyone

    this is what i already did
    -creating of a first Page in the Adminpanel Admin->protected Pages (/page/earth)
    -create a controller
    class EarthController extends Am_Controller {
    function indexAction(){
    $this->view->display('earth.phtml');
    }
    }

    -creating view in themes->mytemplate->earth.phtml

    if i calling the page
    domain.com/page/earth
    it didnt show me the output of earth.phtml

    What iam doing wrong?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    First step is not necessary. Your page already should be available by this url: domain.com/earth when you create new controller.
  3. dazzafact

    dazzafact New Member

    Joined:
    May 19, 2015
    Messages:
    14
    But for The first step, after creating a page in Backend, it shows me a preview link called page/earth (which is also availyble, but empty)
  4. dazzafact

    dazzafact New Member

    Joined:
    May 19, 2015
    Messages:
    14
    Thanks it Works
  5. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    When you create page from amember CP it is handled by default controller so you shouldn't do this if you want to use your own custom controller.

Share This Page