JDocumentHTML/addCustomTag
From Joomla! Documentation
< JDocumentHTML(Difference between revisions)
(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. -->' );