Actions

Difference between revisions of "JDocumentHTML/addCustomTag"

From Joomla! Documentation

(New page: Adds a custom HTML string to the document head. ===Syntax=== void addCustomTag( $html ) where: {| class="wikitable" !Argument !Data type !Description !Default |- |$html |string |Custom HT...)
 
m (Added an example.)
Line 16: Line 16:
 
|}
 
|}
 
===Example===
 
===Example===
 +
Adding a comment to the HTML head section:
 +
<source lang="php">
 +
$doc =& JFactory::getDocument();
 +
$doc=>addCustomTag( '<!-- This is a comment. -->' );
 +
</source>
 
===See also===
 
===See also===
 
* [http://api.joomla.org/Joomla-Framework/Document/JDocumentHTML.html#addCustomTag JDocumentHTML->addCustomTag on api.joomla.org]
 
* [http://api.joomla.org/Joomla-Framework/Document/JDocumentHTML.html#addCustomTag JDocumentHTML->addCustomTag on api.joomla.org]
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocumentHTML]]</noinclude>
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocumentHTML]]</noinclude>

Revision as of 10:17, 9 September 2008

Adds a custom HTML string to the document head.

Syntax

void addCustomTag( $html )

where:

Argument Data type Description Default
$html string Custom HTML string to be added.

Example

Adding a comment to the HTML head section:

$doc =& JFactory::getDocument();
$doc=>addCustomTag( '<!-- This is a comment. -->' );

See also