API16

JDocumentHTML/addFavicon

< API16:JDocumentHTML

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Adds a shortcut icon (favicon)


<! removed transcluded page call, red link never existed >

Syntax

addFavicon($href, $type= 'image/x-icon', $relation= 'shortcut icon')
Parameter Name Default Value Description
$href $href The link that is being related.
$type 'image/x-icon' $type File type
$relation 'shortcut icon' $relation Relation of link public

Defined in

libraries/joomla/document/html/html.php

Importing

jimport( 'joomla.document.html.html' );

Source Body

function addFavicon($href, $type = 'image/x-icon', $relation = 'shortcut icon')
{
        $href = str_replace('\\', '/', $href);
        $this->_links[] = '<link href="'.$href.'" rel="'.$relation.'" type="'.$type.'"';
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement