6.0.0-git
2018-12-11

Diff for Doc/Dev/PageOutput between 3 and 4

+ !PageOutput Object

{{$page_output}} is a global variable defined by the Horde_Framework.  It is used to format the output of dynamically generated pages.


[http://dev.horde.org/api/master/lib/Core/classes/Horde_PageOutput.html API Documentation]

+++ Page Header

<code type="php">
$page_output->header(array(
    'title' => _("List")
));
</code>

+++ Page Footer

<code type="php">
$page_output->footer();
</code>

+++ Adding Javascript

++++ Javscript file that lives in an application's {{js/}} directory

<code type="php">
// $page_output->addScriptFile($name_of_file_relative_to_base_of_js_directory, $app_name);
// Example, for Horde:
$page_output->addScriptFile('login.js', 'horde');
</code>

++++ External Javascript file

<code type="php">
// The file MUST be web accessible.
$page_output->addScriptFile(
    new Horde_Script_File_External($relative_URI_to_JS_file) 
);
</code>

++++ Adding inline Javascript code

<code type="php">
$page_output->addInlineScript(
    $javascript_code,
    true
);
</code>

+++++ PageOutput defaults

Depending on the presentation type (smartmobile, dynamic, basic), PageOutput automatically includes some appropriate javascript environment.
In Horde 5, dynamic mode is based on PrototypeJs and smartmobile is based on jquery-mobile. 
See ((Doc/Dev/HordeAjaxApplications|Ajax Application Docs)) for more details on available environment.