Support Joomla!

references:joomla.framework:document:jdocumentrendererhead-fetchhead

Table of Contents

fetchHead

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Document Class JDocumentRendererHead Method fetchHead Reference fetchHead() Never Work in Progress

Generates the head HTML and return the results as a string.

Renders the following items:

  • document title
  • base href link
  • meta tag data
  • link declarations
  • stylesheet links
  • style declarations
  • script file links
  • script declarations
  • custom tags

The line end characters, tab characters and tag end characters are retrieved from the $document parameter.

Syntax

string fetchHead ( &$document )

&$document JDocument is a JDocument object containing the data to render.

Examples

Example

$document =& JFactory::getDocument();

jimport( 'joomla.document.renderer' );
jimport( 'joomla.document.html.renderer.head' );
$renderer = new JDocumentRendererHead( $document );
echo $renderer->fetchHead( $document );

might produce:

Result

<title>Joomla! 1.5 Testing - Administration</title>
  <meta name="description" content="Joomla! - the dynamic portal engine and content management system" />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />

  <meta name="keywords" content="joomla, Joomla" />
  <script type="text/javascript" src="../includes/js/mootools-uncompressed.js"></script>
  <script type="text/javascript" src="../includes/js/joomla.javascript.js"></script>

Discussion

Full name:
E-Mail:
 
references/joomla.framework/document/jdocumentrendererhead-fetchhead.txt (599 views) · Last modified: 2007/08/15 14:53