Header menu

_________________________________________________________________________________

Monday, 26 August 2013

How to design a basic joomla template ?

File Structure : (to be saved in template directory of joomla)

-------------------------------------------------------------------------------------------------
mytemplate(Folder)
                  -->index.php
                  -->template.xml
                  -->css(Folder)
                                ---> style.css
-------------------------------------------------------------------------------------------------

index.php

<html>
    <head>
        <jdoc:include type="head" />
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/style.css" type="text/css" />
    </head>
    <body>
        Hello !!.. This is a testing template
        <jdoc:include type="modules" name="top" />
        <jdoc:include type="component" />
        <jdoc:include type="modules" name="bottom" />
    </body>
</html> 

template.xml 

<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="template">
        <name>mynewtemplate</name>
        <creationDate>2013-08-27</creationDate>
        <author>Amit kumar</author>
        <authorEmail>ak221189@gmail.com</authorEmail>
        <authorUrl>http://codesplanet.blogspot.com</authorUrl>
        <description>My New Template</description>
        <files>
                <filename>index.php</filename>
                <filename>template.xml</filename>
                <folder>images</folder>
                <folder>css</folder>
        </files>
        <positions>
                <position>breadcrumb</position>
                <position>left</position>
                <position>right</position>
                <position>footer</position>
        </positions>
</extension>

------------------------------------------------------------------------------------


Now for joomla version 2.5 ,
1. go to extension(in admin panel)
2. click on extension manager
3. click on discover tab
4. click on discover button
5. now select your template and click install.

:) Happy coding