| neeraj123 |
|
| Newbie |
 |
Joined: 2010-02-18 05:23:28
Posts: 2
Location: |
|
|
|
|
|
First, open the "templates" directory in your Joomla installation. Then create a subfolder in it named "tutorial_template". All the files of your template will reside in it.
Inside your new directory, create a file called index.php, and another named templateDetails.xml. Then create a folder named css and in it - a new file name template.css. In order to create these files, you can use a simple Notepad and store the files on your computer, and upload them later via FTP or the File Manager of your cPanel.
Those are the basic files that each Joomla template needs to function properly. O
index.php - Specifies the available module positions and the path to your Stylesheet file. This is the main "section" of your template;
templateDetails.xml - This is a system file that provides information about your template to the Joomla application;
css/template.css - The stylesheet file of your template. It defines the looks of your website;
Once you have done that, change the default template for your website to the newly created one. For more information how to do this, check our tutorial on Changing the default template of Joomla 1.5.
Now, let's take a detailed look on what each file should contain:
The index.php file should start with:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<base href="http://udjamaflip.com/forum/view-post/forum-3-joomla-module-and-templatedetails-xml-file-creator/topic-3-joomla-moduletemplate-xml-file-creator/post-0/mode-reply.html" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="Andy, Andrew, Sharman, tips, hints, tutorials, php, css, javascript, plugins, joomla, asp.net, c#, vb.net, software, mac, windows, linux, download, joomla, wordpress, free, module, plugin, component" />
<meta name="description" content="Post A Reply :Joomla module/template XML file creator" />
<meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
<title>Post A Reply :Joomla module/template XML file creator - Andy Sharman's www.udjamaflip.com</title>
<link href="/templates/udjamaflip/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="http://udjamaflip.com/components/com_ccboard/assets/ccboard.css" type="text/css" />
<script type="text/javascript" src="http://udjamaflip.com/plugins/system/mediaobject/js/mediaobject-150.js"></script>
<script type="text/javascript" src="/components/com_jcomments/js/jcomments-v2.1.js?v=2"></script>
<script type="text/javascript" src="/components/com_jcomments/libraries/joomlatune/ajax.js"></script>
<script type="text/javascript" src="/includes/js/joomla.javascript.js"></script>
<script type="text/javascript">
MediaObject.init({'flash':"9,0,124,0",'windowmedia':"5,1,52,701",'quicktime':"6,0,2,0",'realmedia':"7,0,0,0",'shockwave':"8,5,1,0"});
</script>
<script type="text/javascript"> var GB_ROOT_DIR = "http://udjamaflip.com/modules/mod_sociable/greybox/";</script><script type="text/javascript" src="http://udjamaflip.com/modules/mod_sociable/greybox/AJS.js"></script><script type="text/javascript" src="http://udjamaflip.com/modules/mod_sociable/greybox/AJS_fx.js"></script><script type="text/javascript" src="http://udjamaflip.com/modules/mod_sociable/greybox/gb_scripts.js"></script><link href="http://udjamaflip.com/modules/mod_sociable/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
<link href="http://udjamaflip.com/modules/mod_sociable/sociable.css" rel="stylesheet" type="text/css" />
</head>
Those lines specify the beginning of the HTML output of your website. This PHP code - <base href="http://udjamaflip.com/forum/view-post/forum-3-joomla-module-and-templatedetails-xml-file-creator/topic-3-joomla-moduletemplate-xml-file-creator/post-0/mode-reply.html" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="Andy, Andrew, Sharman, tips, hints, tutorials, php, css, javascript, plugins, joomla, asp.net, c#, vb.net, software, mac, windows, linux, download, joomla, wordpress, free, module, plugin, component" />
<meta name="description" content="Post A Reply :Joomla module/template XML file creator" />
<meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
<title>Post A Reply :Joomla module/template XML file creator - Andy Sharman's www.udjamaflip.com</title>
<link href="/templates/udjamaflip/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="http://udjamaflip.com/components/com_ccboard/assets/ccboard.css" type="text/css" />
<script type="text/javascript" src="http://udjamaflip.com/plugins/system/mediaobject/js/mediaobject-150.js"></script>
<script type="text/javascript" src="/components/com_jcomments/js/jcomments-v2.1.js?v=2"></script>
<script type="text/javascript" src="/components/com_jcomments/libraries/joomlatune/ajax.js"></script>
<script type="text/javascript" src="/includes/js/joomla.javascript.js"></script>
<script type="text/javascript">
MediaObject.init({'flash':"9,0,124,0",'windowmedia':"5,1,52,701",'quicktime':"6,0,2,0",'realmedia':"7,0,0,0",'shockwave':"8,5,1,0"});
</script>
<script type="text/javascript"> var GB_ROOT_DIR = "http://udjamaflip.com/modules/mod_sociable/greybox/";</script><script type="text/javascript" src="http://udjamaflip.com/modules/mod_sociable/greybox/AJS.js"></script><script type="text/javascript" src="http://udjamaflip.com/modules/mod_sociable/greybox/AJS_fx.js"></script><script type="text/javascript" src="http://udjamaflip.com/modules/mod_sociable/greybox/gb_scripts.js"></script><link href="http://udjamaflip.com/modules/mod_sociable/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
<link href="http://udjamaflip.com/modules/mod_sociable/sociable.css" rel="stylesheet" type="text/css" />
will include in your page the Joomla header content (the page title, meta description, keywords, etc.) that you have added in the administrative end of your application.
Next, we have to add the "body" part of your website:
<body>
<jdoc:include type="component" />
</body>
</html>
The <jdoc:include type="component" /> line will display the main content of any given page. |
IP Logged
|
|