Support Joomla!

references:joomla.framework:application:japplication-addcustomheadtag

Table of Contents

addCustomHeadTag

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JApplication Method addCustomHeadTag Reference addCustomHeadTag() Never Internal Review

Adds a custom HTML string to the head block of the current page being processed.

The method is deprecated and provided for backwards compatibility with Joomla! 1.0. It is scheduled to be removed in future versions. Use JDocumentHTML::addCustomTag instead.

Syntax

void addCustomHeadTag ( $html )

$html string the custom html element (tag) to add to the document head.

Examples

The following code will insert a head element into the page that will link to the file samplejavascript.js.

Example

function insertCustomHeader() {
    global $mainframe;
 
    $customHead = '<script language="JavaScript" '
    . 'src="samplejavascript.js" '
    . 'type="text/javascript"></script>'
    ;
 
    $mainframe->addCustomHeadTag( $customHead );
}

insertCustomHeader();

 
references/joomla.framework/application/japplication-addcustomheadtag.txt (1328 views) · Last modified: 2007/09/22 02:46