API17

JHtml::script: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 4: Line 4:
Write a <script></script> element.  
Write a <script></script> element.  


{{subst:Description:JHtml::script}}
 


<source lang="php">
<source lang="php">
Line 57: Line 57:
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Html|Html]]
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Html|Html]]
* [[API17:JHtml::script|Other versions of JHtml::script]]
* [[API17:JHtml::script|Other versions of JHtml::script]]
{{subst:SeeAlso:JHtml::script}}
 


===User contributed notes===
===User contributed notes===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
noresultsheader=\n
noresultsheader=\n
category=JHtml::script
category=JHtml::script
category=CodeExample
namespace=CodeExample
category=MethodExample
category=MethodExample
include=*
include=*

Latest revision as of 03:10, 25 March 2017

Joomla 11.1 JHtml::script

Description

Write a <script></script> element.


public static function script (
        $file
        $framework=false
        $relative=false
        $path_only=false
        $detect_browser=true
)
Parameter Type Default Description
$file string path to file
$framework boolean false load the JS framework
$relative boolean false path to file is relative to /media folder
$path_only boolean false return the path to the file only
$detect_browser boolean true detect browser to include specific browser js files
  • Returns mixed nothing if $path_only is false, null, path or array of path if specific js browser files were detected
  • Defined on line 483 of libraries/joomla/html/html.php
  • Since Joomla 11.1

See also


User contributed notes

Code Examples