Basic template for Joomla 2.5


/ Published in: PHP
Save to your folder(s)

Basic template for Joomla 2.5 with 3 columns


Copy this code and paste it in your HTML
  1. <?php
  2. defined('_JEXEC') or die;
  3.  
  4. JHtml::_('behavior.framework', true);
  5.  
  6. $app = JFactory::getApplication();
  7.  
  8. ?>
  9.  
  10. <?php echo '<?'; ?>xml version="1.0" encoding="<?php echo $this->_charset ?>"?>
  11. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  12. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
  13.  
  14. <head>
  15.  
  16. <jdoc:include type="head" />
  17.  
  18. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
  19. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style.css" type="text/css" />
  20.  
  21. <!--[if IE]>
  22. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ie.css" type="text/css" />
  23. <![endif]-->
  24. <!--[if IE 6]>
  25. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ie6.css" type="text/css" />
  26. <![endif]-->
  27. <!--[if IE 7]>
  28. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ie7.css" type="text/css" />
  29. <![endif]-->
  30. <!--[if IE 8]>
  31. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ie8.css" type="text/css" />
  32. <![endif]-->
  33. <!--[if IE 9]>
  34. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ie9.css" type="text/css" />
  35. <![endif]-->
  36. <!--[if gt IE 6]>
  37. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_iegt6.css" type="text/css" />
  38. <![endif]-->
  39. <!--[if lte IE 7]>
  40. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ielte7.css" type="text/css" />
  41. <![endif]-->
  42. <!--[if gte IE 8]>
  43. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_iegte8.css" type="text/css" />
  44. <![endif]-->
  45. <!--[if lt IE 9]>
  46. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style_ielt9.css" type="text/css" />
  47. <![endif]-->
  48.  
  49. </head>
  50. <body>
  51. <div id="wrapper">
  52.  
  53.  
  54. <div id="header">
  55. <h1><?php echo $app->getCfg('sitename'); ?></h1>
  56. </div>
  57.  
  58. <div id="content">
  59.  
  60. <?php if($this->countModules('left')) : ?>
  61. <div class="columnLeft">
  62. <jdoc:include type="modules" name="left" style="none" />
  63. </div>
  64. <?php endif; ?>
  65.  
  66. <div id="maincontent">
  67. <jdoc:include type="message" />
  68. <jdoc:include type="component" />
  69. </div>
  70.  
  71. <?php if($this->countModules('right')) : ?>
  72. <div class="columnRight">
  73. <jdoc:include type="modules" name="right" style="none" />
  74. </div>
  75. <?php endif; ?>
  76.  
  77. </div>
  78.  
  79. <?php if($this->countModules('footer')) : ?>
  80. <div class="footer">
  81. <jdoc:include type="modules" name="footer" style="none" />
  82. </div>
  83. <?php endif; ?>
  84.  
  85.  
  86. </div>
  87. </body>
  88. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.