Actions

User

Difference between revisions of "Rvsjoen/tutorial/Developing a Template/Part 03"

From Joomla! Documentation

< User:Rvsjoen‎ | tutorial/Developing a Template
(Part 03 - Adding module positions)
(Part 03 - Adding module positions)
Line 5: Line 5:
 
<span id="index.php">
 
<span id="index.php">
 
'''<tt>index.php</tt>'''
 
'''<tt>index.php</tt>'''
<source lang="php">
+
<source lang="html">
 
<?php
 
<?php
 
   
 
   

Revision as of 05:03, 16 April 2012

Contents

Part 03 - Adding module positions

With your favorite editor, edit the following file

index.php

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, basic4gl, bf, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cobol, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, email, fortran, freebasic, genero, gettext, glsl, gml, gnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, lolcode, lotusformulas, lotusscript, lscript, lua, m68k, make, matlab, mirc, mpasm, mxml, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle11, oracle8, pascal, per, perl, php, php-brief, pic16, pixelbender, plsql, povray, powershell, progress, prolog, providex, python, qbasic, rails, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, xml, xorg_conf, xpp, z80


<?php
 
/**
 * @package     Joomla.Tutorials
 * @subpackage  Template
 * @copyright   Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license     License GNU General Public License version 2 or later; see LICENSE.txt
 */
 
// No direct access to this file
defined('_JEXEC') or die;
 
?>
<!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/styles.css" type="text/css" />
        </head>
        <body>
                <div id="container">
                        <div id="header">
                                <jdoc:include type="modules" name="header" />
                        </div>
                        <div id="left">
                                <jdoc:include type="modules" name="left" />
                        </div>
                        <div id="main">
                                <jdoc:include type="message" />
                                <jdoc:include type="component" />                       
                        </div>
                        <div id="footer">
                                <jdoc:include type="modules" name="footer" />
                        </div>
                </div>
        </body>
</html>

With your favorite editor, edit the following file

templateDetails.xml

<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="template" client="site">
        <name>helloworld</name>
        <creationDate>Once upon a time</creationDate>
        <author>John Doe</author>
        <authorEmail>john.doe@example.org</authorEmail>
        <authorUrl>http://www.example.org</authorUrl>
        <copyright>Copyright Info</copyright>
        <license>License Info</license>
        <version>0.0.1</version>
        <description>Description of the Hello World! template...</description>
        <files>
                <filename>index.php</filename>
                <filename>templateDetails.xml</filename>
                <folder>css</folder>
        </files>
        <positions>
                <position>header</position>
                <position>footer</position>
                <position>left</position>
        </positions>
</extension>

File listing

Testing your template

For details on how to install the template into your Joomla! site, refer to the information provided in Part 01.

Download this part

Articles in this series

This tutorial is supported by the following versions of Joomla!

Joomla 2.5