|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
maxboost Smarty Rookie
Joined: 27 Mar 2014 Posts: 11
|
Posted: Sat Mar 29, 2014 4:52 pm Post subject: |
|
|
My index.php
Code: |
<?php
// SwitchMIA Smarty Template System
require 'libs/Smarty.class.php';
$smarty = new Smarty;
//$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$page = $_GET['page'];
$smarty->display("page_{$_GET['page']}.tpl"); |
my page_home.tpl
Code: | {extends file="layout_home.tpl"}
{block name=title}My Page Title{/block}
{block name=body}My HTML Page Body goes here{/block} | [/quote] |
|
Back to top |
|
maxboost Smarty Rookie
Joined: 27 Mar 2014 Posts: 11
|
Posted: Sat Mar 29, 2014 6:06 pm Post subject: |
|
|
ah wait, you forgotten the 'path' as the smarty is not configured to use a template 'path' but just current directory and the templates where stored in ./templates/switchmia/html/<templates.tpl> |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|