Free Joomla Templates

joomla Layout File

While the template layout file is a PHP file, it iswritten mostly in HTML with only a few snippets of PHP.You do not have to be a master of PHP to write a templatefile. All you need to be able to do is learn where toplace the key "hooks" into the Joomla templatingengine. {mosgoogle}

Within the HTML framework you place "windows" that look into thedatabase behind your web site. There are typically severalsmall windows called Modules and usually one largeropening (like a frontdoor) for a Component.You are encouraged to write templates in XHTML. Whilethere is debate over whether XHTML *is* the way of thefuture, it is a well formed XML standard, whereas HTML isa loose standard. Future versions of Joomla will rely moreand more on XML so it is wise to adopt this modelnow.The index.php file for a typical 3-column layout wouldlook like the following in a skeletal form:
1: <?php
2: $iso = explode( '=', _ISO );
3: echo '<?xml version="1.0" encoding="' . $iso[1] . "\"?>\n";
4: /** ensure this file is being included by a parent file */
5: defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
6: ?>
7: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8: <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo _LANGUAGE; ?>">
9: <head>
10: <title><?php echo $mosConfig_sitename; ?></title>
11: <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
12: <?php
13: if ($my->id) {
14: initEditor();
15: }
16: ?>
17: <?php mosShowHead(); ?>
18: <link href="<?php echo $mosConfig_live_site;?>/templates/basic_template/css/template_css.css"rel="stylesheet" type="text/css" />
19: </head>
20: <body>
21: <table cellspacing="0" cellpadding="5" border="0">
22: <tr>
23: <td colspan="3">
24: <?php echo $mosConfig_sitename; ?>
25: </td>
26: </tr>
27: <tr>
28: <td colspan="3">
29: <?php mosLoadModules ( 'top', 1 ); ?>
30: </td>
31: </tr>
32: <tr>

 
< Prev   Next >
 
Joomla Templates by Joomlashack