Poniżej znajduje się zawartość pliku index.php, css.css oraz pliku templateDetails.xml.
Na podstawie tych plików utworzymy prosty szablon do Joomla!
index.php |
<?php defined('_JEXEC') or die; ?>
<!DOCTYPE html>
<html lang="pl-PL" dir="ltr">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/templates/szablon/css/style.css" />
<jdoc:include type="head" />
</head>
<body>
<div>
<jdoc:include type="modules" name="position-0" style="none" />
</div>
<div>
<jdoc:include type="modules" name="position-1" style="none" />
</div>
<jdoc:include type="modules" name="banner" style="xhtml" />
<div>
<jdoc:include type="modules" name="position-8" style="xhtml" />
</div>
<div>
<!-- Begin Content -->
<jdoc:include type="modules" name="position-3" style="xhtml" />
<jdoc:include type="message" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="position-2" style="none" />
<!-- End Content -->
</div>
<div>
<!-- Begin Right Sidebar -->
<jdoc:include type="modules" name="position-7" style="well" />
<!-- End Right Sidebar -->
</div>
<!-- Footer -->
<div>
<jdoc:include type="modules" name="footer" style="none" />
</div>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>
|
templateDetails.xml |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN" "https://www.joomla.org/xml/dtd/2.5/template-install.dtd">
<extension version="0.1" type="template" client="site">
<name>Szablon</name>
<version>1.0</version>
<creationDate>06-11-2017</creationDate>
<author>Rafał Orzełek</author>
<authorEmail>Ten adres pocztowy jest chroniony przed spamowaniem. Aby go zobaczyć, konieczne jest włączenie w przeglądarce obsługi JavaScript.</authorEmail>
<copyright>Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.</copyright>
<description>Podstawowy szablon bez stylowania</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
</files>
<positions>
<position>banner</position>
<position>debug</position>
<position>position-0</position>
<position>position-1</position>
<position>position-2</position>
<position>position-3</position>
<position>position-7</position>
<position>position-8</position>
<position>footer</position>
</positions>
</extension>
|
css.css |
body{font-size:16px; color:black; background:white; margin:0; padding:0}
|