Views - dknx01/micromvc GitHub Wiki

Views

Views are the HTML output for our application.

There're located in Application/View/. Each Controller has it's own folder and each function its own file (ACTIONNAME.phtml).

Access data

$this->viewData->PARAMNAME;

Default functions

  • Request object:$this->getRequest();
  • Config object: $this->config->getParam('NAME');

Other view scripts

  • ACTIONAME.header.phtml: file for additional header output. Normally under the title-tag
  • ACTIONAME.footer.phtml: file for additional footer output. Normally direct over the body-end-tag