[commits] [Wiki] changed: Doc/Dev/PageOutput

Michael Slusarz slusarz at horde.org
Mon Jun 24 17:47:39 UTC 2013


slusarz  Mon, 24 Jun 2013 17:47:39 +0000

Modified page: http://wiki.horde.org/Doc/Dev/PageOutput
New Revision:  2
Change log:  More examples

@@ -1,5 +1,5 @@
-+ PageOutput Object
++ !PageOutput Object

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

  +++ Page Header
@@ -9,15 +9,28 @@
      'title' => _("List")
  ));
  </code>

-++ Page Footer
++++ Page Footer

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

  +++ Adding Javascript
+
+++++ Javscript 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

  <code type="php">
-$page_output->addScriptFile('jquery-ui/jquery-1.7.min.js');
+// The file MUST be web accessible.
+$page_output->addScriptFile(
+    new Horde_Script_File_External($relative_URI_to_JS_file)
+);
  </code>



More information about the commits mailing list