Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2223

Templates for Joomla! 5.x • css & js in custom template not working:

$
0
0
I am trying to add my own template to my Joomla project. So far what I've done is the following:

* Created a folder for the template.
* Added index.php & templateDetails.xml, plus the css & js files
* Included all the files in the .xml document like so:

Code:

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE install PUBLIC "-//Joomla! 3.0//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/3.0/template.dtd"><extension type="template" version="3.9" client="site" method="upgrade">    <name>GardenTemplate</name>    <creationDate>March 2024</creationDate>    <author>F.P</author>    <version>1.0</version>    <description>My Custom Joomla Template</description>    <files>        <filename>index.php</filename><filename>css/style.css</filename>    <filename>js/script.js</filename>        <!-- Add other files here if needed -->    </files></extension>
* Zipped everything and installed in Joomla admin as extension.
* Set the new template as default.

The markup itself is being displayed, but the css and js doesn't work for some reason. I tried clearing the cache in both the browser & in Joomla Admin, but it doesn't seem to fix anything.

What causes this and how can I solve it?

Statistics: Posted by SocketPup — Mon Mar 18, 2024 4:39 pm



Viewing all articles
Browse latest Browse all 2223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>