tt classic one - phpManufaktur/kfTemplateTools GitHub Wiki

The tt_classic_one Template show you how to create a simple template in the classic non-responsive way using the TemplateTools.

This template is using:

and looks at All Devices (from Desktop down to Phone) like:

The template tt_classic_one needs only 41 lines of code in your index.php:

<!DOCTYPE html>
<html lang="en">
  <?php
    require_once WB_PATH.'/kit2/extension/phpmanufaktur/phpManufaktur/TemplateTools/initialize.php';  
	$template['twig']->display('@pattern/classic/head.simple.twig');
  ?>
  <body>
    <div class="body-container">      
      <div class="logo-container">
        <div class="logo">
          <a href="<?php echo CMS_URL; ?>" title="<?php echo CMS_TITLE; ?>">
            <img src="<?php echo MANUFAKTUR_URL; ?>/TemplateTools/extension.jpg" width="200" height="200" alt="TemplateTools" />
          </a>
        </div>
        <div class="template-name">
          <div class="template-name-header">
            <?php echo TEMPLATE_NAME; ?>
          </div>
          <div class="template-name-path">
            <?php echo TEMPLATE_PATH; ?>
          </div>
        </div>
      </div>
      <div class="content">        
        <div class="navigation">
          <?php $template['cms']->show_menu2(); ?>
        </div>        
        <div class="main">          
          <?php $template['twig']->display('@pattern/classic/search.div.twig'); ?>          
          <div class="breadcrumb">
            <?php $template['classic']->breadcrumb(); ?>
          </div>
          <?php $template['cms']->page_content(); ?>                   
        </div>
      </div>      
      <div class="footer">
        <?php echo PAGE_FOOTER; ?>
      </div>
    </div>
  </body>
</html>

The first step is to enable the TemplateTools for the usage in your index.php template file:

<?php
  require_once WB_PATH.'/kit2/extension/phpmanufaktur/phpManufaktur/TemplateTools/initialize.php';  
?>

the require statement is always the same, so you can copy and paste it into your own template.

After this you have full access to all Constants, Services and Pattern of the TemplateTools.

$template['twig']->display('@pattern/classic/head.simple.twig');

We are using the Twig Service display() command to include and show the the Classic Pattern head.simple.twig.

The head.simple.twig will set all important information like the page title, description, keywords and will try to load a template.css file from your template directory (the file should be placed in the root directory of the template or in the /css subdirectory).

<div class="body-container">

is the main container for this template and defined in /css/template.css:

.body-container {
  position: relative;
  margin: 0 auto 0 auto;
  padding: 0;
  width: 900px;
  height: auto;
}

The logo container places a logo at the left side, the name of the template and the path to the template tt_classic_one at the right side:

<div class="logo-container">
  <div class="logo">
    <a href="<?php echo CMS_URL; ?>" title="<?php echo CMS_TITLE; ?>">
      <img src="<?php echo MANUFAKTUR_URL; ?>/TemplateTools/extension.jpg" width="200" height="200" alt="TemplateTools" />
    </a>
  </div>
  <div class="template-name">
    <div class="template-name-header">
      <?php echo TEMPLATE_NAME; ?>
    </div>
    <div class="template-name-path">
      <?php echo TEMPLATE_PATH; ?>
    </div>
  </div>
</div>

The logo will be shown in a fixed size of 200x200 pixels and is linked to the start page of the CMS.

<?php $template['twig']->display('@pattern/classic/search.div.twig'); ?>

Show a search box for the CMS search function at the right side of the template body. The container is using a standard formatting, please fit it to your needs.

<?php $template['classic']->breadcrumb(); ?>

Is using the Classic Service breadcrumb() to show a standard breadcrumb navigation.

<?php $template['cms']->page_content(); ?>

Use the standard CMS Service page_content() to show the content of the actual page.

<div class="navigation col-sm-3 col-sm-pull-9">
  <?php $template['cms']->show_menu2(); ?>
</div>

Is using the standard CMS Service show_menu2() to a navigation through the website.

<div class="footer row">
  <div class="col-sm-9 col-sm-offset-3">
    <?php echo PAGE_FOOTER; ?>
  </div>
</div>

The footer container will show a PAGE_FOOTER, if you have defined one in the settings of the Content Management System.

tt_bootstrap_two | tt_classic_two

⚠️ **GitHub.com Fallback** ⚠️