Skip to content
Sri Lanka · Colombo · GlobalMon–Fri, 09:00–18:00 IST
Web Design 1 min read

How to add CSS and Javascript to Your Joomla Extension

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

Amila Rajapaksha
Written by
Amila Rajapaksha
CEO / Managing Director, Mobiz International (Pvt) Ltd

Amila Rajapaksha is the CEO and Managing Director of Mobiz International (Pvt) Ltd, a web design and development company based in Gampaha, Sri Lanka. Since 2010 he has helped businesses across Sri Lanka and overseas launch fast, search-friendly websites and online stores — working hands-on with WordPress, Magento and custom Laravel builds, and the SEO that makes them rank.

39 views 265 articles
Share:
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');
Share:

Related Articles

Comments (0)

Log in or sign up to leave a comment.

No comments yet. Be the first to share your thoughts!