| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Document |
JDocumentHTML |
addFavicon |
addFavicon() |
Never | Work in Progress |
Adds a shortcut icon (favicon). This adds a link to the icon shown in the favorites list or on the left of the url in the address bar. Some browsers display it on the tab, as well.
void addFavicon ( $href, $type, $relation )
| $href | string | is a string containing the link that is being related. |
| $type | string | this is a link containing the file type of the icon. This parameter is optional and if omitted defaults to ‘image/x-icon’. |
| $relation | string | this is a string containing the relation of link. This parameter is optional and if omitted defaults to ‘shortcut icon’. |
Set the favourite icon to use for the document.
Example
global $mainframe; $document =& JFactory::getDocument(); $document->addFavicon( "http://dev.joomla.org/images/favicon.ico" );
adds the following code to the head block:
Result
<link href="http://dev.joomla.org/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />