Mechanism

When a page is called:

  • The script alahup/_main.php is called.

    It's responsible for displaying the main template.

    By default, it contains this :

    alahup/_main.php :
    $alahup->smarty->display('main.tpl');

    This line simply tells alahup! to proccess and display the template file called main.tpl.

    It's a good place to implement custom user identification, custom redirection, caching, template switching, ...

  • The main template is processed and displayed.

    The content blocks invoked from the main template (with {$alahup->block()} function) are fetched and rendered recursively :

    • alahup! fetches each block from the database in an xml form.

    • The xml is turned into a tree of elements.

    • This tree is rendered recursively : each element is rendered with its specific dynamic template.