JoomlaSriLanka | Web Designer in Sri Lanka

How to add CSS and Javascript to Your Joomla 1.5 Extension

When creating a quality Joomla extension you will place your styles and javascript codes on seperate files. 

Then here is the way to add those files in to the joomla extension the proper way. 

$document = JFactory::getDocument();
$document->addStyleSheet(JURI::root().'mod_name/css/stylesheet.css');
$document->addScript(JURI::root(). 'mod_name/js/script.js');

Add comment


Security code
Refresh

 

Latest Work UG - New Zealand

uglydumpling.co.nz web design by sri lankan design company for new zealand

 

 

Paradise Vacations : Web Design | Joomla

 

 

paradisevacations1

 

Fly Sri Lanka : Web Design : Joomla

 

 

flysrilanka