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

Your Web Design Partner in Sri Lanka

Register or Login with Facebook

What is Joomla! ?

Joomla® is an open source content management system (CMS) for publishing content on the internet as well as on intranets. Joomla® CMS is developed and maintained by Joomla Project of Open Source Matters. Click here to go to Joomla Official website.   

We provide customized website solutions powered by Joomla since 2005. Read more about our Joomla solutions here.

Visit us on your Smartphone

qrcode.joomlasrilanka.com

Scan this QR code with your smartphone to see our mobile website.

Login Form

අපගේ සේවාවන්

ජූම්ලාශ්‍රීලංකා වන අපි  , ශ්‍රිලංකාවේ ස්ථාපනය කර ඇති සම්පූර්ණ අන්තර්ජාල සේවා සපයන ආයතනයකි. වෙබ් අඩවි නිර්මානය , සංවර්ධනය සහ අනෙකුත් අන්තර්ජාලය සම්බන්ධ සියලුම සේවා සඳහා අමතන්න 0773852227

අපගේ සේවාවන්
1. වෙබ් අඩවි නිර්මාණය ( වෙබ් ඩිසයිනින්)
2. අන්තර්ජාල මෘදුකාංග සංවර්ධනය ( වෙබ් ඇප්ලිකේෂන් ඩිවෙලොප්මෙන්ට්)
3. වෙබ් හෝස්ටින් සහ ඊ-මේල් පහසුකම්
4. ජූම්ලා! තොරතුරු කලමනාකරණ පද්ධතිය ස්ථාපනය 
5.වෙබ් අඩවි සෙවුම් යන්ත්‍ර සඳහා ප්‍රශස්තිකරණය ( සර්ච් එන්ජින් ඔප්ටිමයිෂේශන් )
6. අන්තර්ජාලය තුල ව්‍යාපාර කටයුතු සඳහා ඊ-වාණිජ්‍ය වෙබ් අඩවි නිර්මාණය  ( ඊ කොමර්ස් වෙබ් සයිට් ) 

Loading ...