\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{PageOutput Object}
\texttt{\$page\_output} is a global variable defined by the Horde\_Framework.  It is used to format the output of dynamically generated pages.

<a href="http://dev.horde.org/api/master/lib/Core/classes/Horde_PageOutput.html">API Documentation</a>

\subsection{Page Header}
<pre><code class="language-php">
\$page\_output->header(array(
    'title' => \_("List")
));
</code></pre>
\subsection{Page Footer}
<pre><code class="language-php">
\$page\_output->footer();
</code></pre>
\subsection{Adding Javascript}
\subsubsection{Javscript file that lives in an application's \texttt{js/} directory}
<pre><code class="language-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></pre>
\subsubsection{External Javascript file}
<pre><code class="language-php">
// The file MUST be web accessible.
\$page\_output->addScriptFile(
    new Horde\_Script\_File\_External(\$relative\_URI\_to\_JS\_file) 
);
</code></pre>
\subsubsection{Adding inline Javascript code}
<pre><code class="language-php">
\$page\_output->addInlineScript(
    \$javascript\_code,
    true
);
</code></pre>
\paragraph{<a href="https://wiki.horde.org/PageOutput">PageOutput</a> defaults}
Depending on the presentation type (smartmobile, dynamic, basic), <a href="https://wiki.horde.org/PageOutput">PageOutput</a> automatically includes some appropriate javascript environment.<br />
In Horde 5, dynamic mode is based on <a href="https://wiki.horde.org/PrototypeJs">PrototypeJs</a> and smartmobile is based on jquery-mobile.<br />
See <a href="https://wiki.horde.org/Doc/Dev/HordeAjaxApplications">Ajax Application Docs</a> for more details on available environment.

\end{document}
