Skip to content

Instantly share code, notes, and snippets.

@cod3cow
Last active February 7, 2023 08:00
Show Gist options
  • Save cod3cow/b86653d62779391d49948c2bbc6a21ba to your computer and use it in GitHub Desktop.
Save cod3cow/b86653d62779391d49948c2bbc6a21ba to your computer and use it in GitHub Desktop.
Simple boilerplate for a Joomla template
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
</head>
<body>
<jdoc:include type="message" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="debug" />
</body>
</html>
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="template" client="site">
<name>MyTemplate</name>
<author>Author Name</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://example.com</authorUrl>
<version>1.0.0</version>
<description>MyTemplate is a simple and modern Joomla template.</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<folder>css</folder>
<folder>js</folder>
<folder>html</folder>
</files>
<positions>
<position>debug</position>
</positions>
</extension>
@cod3cow
Copy link
Author

cod3cow commented Feb 7, 2023

This template includes the basic structure of a Joomla template, including the inclusion of head information, messages, components, and module positions. You can then customize it to fit your needs by adding your own stylesheets, modifying the layout, and adding additional module positions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment