[commits] [Wiki] changed: Doc/Dev/PageOutput
Michael Slusarz
slusarz at horde.org
Mon Jun 24 17:52:34 UTC 2013
slusarz Mon, 24 Jun 2013 17:52:34 +0000
Modified page: http://wiki.horde.org/Doc/Dev/PageOutput
New Revision: 3
Change log: add inline script/API link
@@ -3,5 +3,8 @@
{{$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">
@@ -17,20 +20,29 @@
</code>
+++ Adding Javascript
-++++ Javscript that lives in an application's {{js/}} directory
+++++ 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
+++++ 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>
More information about the commits
mailing list