Code Of The Two-column Template

THL Toolbox > Developers' Zone > Web Development > The Anatomy Of Your New Page, Part 2, Top To Bottom > Code of Two-Column Template

Code of the Two-Column Template

The THL two-column template uses many PHP includes to concatenate code from various source files into a single THL page. These includes are all done on the server-side. So, viewing the source of a THL page will not show you how it is coded on the developer's side. While the result of the two-column template can be seen at external link: /template/index-2column.php. One can see the elaborate resultant HTML code of this page by viewing source in one's browser. Compare that to the following simple PHP code that constructs the page:

<? $droot = $_SERVER['DOCUMENT_ROOT'];  ?>

<? include_once  "$droot/global/php/header.php" ; ?>

<body class="NAME-OF-THL-DOMAIN-HERE">

<!-- begin masthead -->
<? include_once "$droot/global/php/masthead.php" ; ?>
<!-- end masthead -->






<!-- begin content -->
<div id="content">
<div class="shell-1">

<h1>PAGE-TITLE-HERE</h1>

<p>CONTENT-HERE</p>

</div></div><!-- end content -->



<!-- begin footer -->
<? include_once "$droot/global/php/footer.php" ; ?>
<!-- end footer -->

</body>
</html>

<!-- begin footer utility -->
<? include_once "$droot/global/php/footer-utility.php" ; ?>
<!-- end footer utility -->

Provided for unrestricted use by the external link: Tibetan and Himalayan Library