Support Joomla!

references:joomla.framework:document:jdocumenthtml-setbase

Table of Contents

setBase

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

Sets the document base URL tag.

Syntax

void setBase ( $url )

$url string is a string containing the url to be used in the base tag.

Examples

Set the document base URL tag.

Example

global $mainframe;

$document =& JFactory::getDocument();
$document->setBase( $mainframe->getBaseURL() );

might result in the following base tag in the head block:

Result

<base href="http://127.0.0.1/joomla11/" />
 
references/joomla.framework/document/jdocumenthtml-setbase.txt (699 views) · Last modified: 2007/08/15 14:53