A utility class to load view templates, media files and modules.
Located in /libraries/fof/template/utils.php (line 17)
Add a CSS file to the page generated by the CMS
Add a JS script file to the page generated by the CMS.
There are three combinations of defer and async (see http://www.w3schools.com/tags/att_script_defer.asp): * $defer false, $async true: The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing) * $defer true, $async false: The script is executed when the page has finished parsing. * $defer false, $async false. (default) The script is loaded and executed immediately. When it finishes loading the browser continues parsing the rest of the page.
When you are using $defer = true there is no guarantee about the load order of the scripts. Whichever script loads first will be executed first. The order they appear on the page is completely irrelevant.
Compile a LESS file into CSS and add it to the page generated by the CMS.
This method has integrated cache support. The compiled LESS files will be written to the media/lib_fof/compiled directory of your site. If the file cannot be written we will use the $altPath, if specified
Parse a fancy path definition into a path relative to the site's root.
It returns both the normal and alternative (template media override) path. For example, media://com_foobar/css/test.css is parsed into array( 'normal' => 'media/com_foobar/css/test.css', 'alternate' => 'templates/mytemplate/media/com_foobar/css//test.css' );
The valid protocols are: media:// The media directory or a media override admin:// Path relative to administrator directory (no alternate) site:// Path relative to site's root (no alternate)
Returns the contents of a module position
Parse a fancy path definition into a path relative to the site's root, respecting template overrides, suitable for inclusion of media files.
For example, media://com_foobar/css/test.css is parsed into media/com_foobar/css/test.css if no override is found, or templates/mytemplate/media/com_foobar/css/test.css if the current template is called mytemplate and there's a media override for it.
The valid protocols are: media:// The media directory or a media override admin:// Path relative to administrator directory (no overrides) site:// Path relative to site's root (no overrides)
Merges the current url with new or changed parameters.
This method merges the route string with the url parameters defined in current url. The parameters defined in current url, but not given in route string, will automatically reused in the resulting url. But only these following parameters will be reused:
option, view, layout, format
Example:
Assuming that current url is: http://fobar.com/index.php?option=com_foo&view=cpanel
Result: http://fobar.com/index.php?option=com_foo&view=categories&layout=tree
Creates a SEF compatible sort header. Standard Joomla function will add a href="#" tag, so with SEF enabled, the browser will follow the fake link instead of processing the onSubmit event; so we need a fix.
Documentation generated on Tue, 19 Nov 2013 15:16:44 +0100 by phpDocumentor 1.4.3