Last Updated: February 25, 2016
· teknonono

Modify head in Joomla page

//First get the current document object
$doc = &JFactory::getDocument();

//Will create a empty generator meta tag. If you dont want 
//everyone to know site is running on Joomla.
//Sets the description meta tag
$doc->setDescription('some desc');
//sets the title tag
$doc->setTitle('Some Title');
//create a meta tag
//adds a linked style sheet
//adds a linked javascript or other type of script file
//add a custom tag. Use to add any kind of tag to the head section.
//Add custom javascript code snippet. Pass in javascript code and 
//will add the <script> tags for you. Joomla places these snippets 
//after placement of addScript() scripts.
//Add custom css style snippet. Pass in css styles and will add 
//the <style> tags for you. Joomla will place these styles after 
//placement of addStyleSheet() styles.