Actions

Difference between revisions of "JDocument/getMetaData"

From Joomla! Documentation

m (Added table formatting.)
m (See also: Framework => Platform)
 
(One intermediate revision by one user not shown)
Line 21: Line 21:
 
===Example===
 
===Example===
 
<source lang="php">
 
<source lang="php">
$doc = JFactory::getDocument();
+
$doc =& JFactory::getDocument();
 
$content = $doc->getMetaData( “tag-name” );
 
$content = $doc->getMetaData( “tag-name” );
 
</source>
 
</source>
 
===See also===
 
===See also===
* [http://api.joomla.org/Joomla-Framework/Document/JDocument.html#getMetaData JDocument->getMetaData on api.joomla.org]
+
* [http://api.joomla.org/Joomla-Platform/Document/JDocument.html#getMetaData JDocument->getMetaData on api.joomla.org]
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocument]]</noinclude>
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocument]]</noinclude>

Latest revision as of 03:28, 25 September 2013

Syntax

string getMetaData( $name, $http-equiv )

where:

Argument Data type Description Default
$name string Name of meta data item. If $name is 'description' or 'generator' then the effect is the same as calling getDescription or getGenerator respectively.
$http-equiv Boolean True if meta data item requested is equivalent to an HTTP header field. false

Example

$doc =& JFactory::getDocument();
$content = $doc->getMetaData( “tag-name” );

See also