Templates

Posted by Lachhekumar Nadar on 2009-07-07 00:35:36

Template is important sector in any web frame work, koolphp manage template in simple, easy and smatt way you can have 3 type of template

  1. Common Template
  2. Group template
  3. Custom template

There are some important variable that you have to use in the template file

[[template_title]] It will contain the page title

[[template_metatag]] this is important variable without which site will not work properly, so please always add this variable

[[content]] this also important one, without this your matter on the site will be not displayed

template
  first.php
  last.php
  products.htm
  .index.htm
template.htm

Now we will have details about the template template, in the above example we have /template.htm this is the template default for the site. If the custom template or group template is not found then the default template is used to render site.

Custom template is the template that is applied for only one page, the page whose name match with the template name, in the above example template/.index.htm is the custom template for the index.html url, sometime custom template can act as the group template for example the template/products.htm this is custom template for the /products.html url but when you use the name as products_x.html then also the template/products.htm is used this time it act as the group template

Group template is the template apply to the group of the page in above example template/products.htm is the group template that will be applied to /products.html or /products_name.html pages

 

PHP Code
<?
// custom  title        
$metatag_title        "KOOLPHP driven site";
// custome description
$metatag_desc        =  "This is the description";
//custome metatag keywords
        
$metatag_keywords    "Here we go with keywords";

?>