Front Controller design pattern allows you to stay in a single page and include the necessary files according to your actions.

The current actions can be broadly divided into two levels

  1. Module in which you are performing operation i.e. accessed by mod=<module prefix>
  2. Action that your are performing. i.e. accessed by act=<action prefix>


There are mainly two types of overrides available

  1. Override that will be passed to the url e.g stream
  2. Overrides which can be included in the of the module i.e. Overriding with

Overriding with url

Overriding with

Following are the types of overrides that are available with

  1. Overriding html head (key: html_head)
  2. Overriding page header (key: header)
  3. Overriding main menu (key: mainmenu)
  4. Overriding login section (key: login)
  5. Overriding footer (key: footer)

To override any of the above sections all you need to do is create a function called shn_<module prefix>_<key mention above>

Example: Overriding HTML Head Totally
function shn_test_html_head()
<title>This is very simple head without css even</title>
Example2: Just adding another javascript
function shn_test_html_head()
    global $global;
    include $global['approot']."/inc/";
    $myjavascripts = array ('<script type="text/javascript" src="index.php?stream=text&mod=test&act=say_hello" ></script>',
'<script type="text/javascript" src="index.php?stream=text&mod=test&act=say_world"></script>');

QR Code
QR Code dev:frontcontroller (generated for current page)