|
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 |
Gertjan Smarty n00b
Joined: 30 Mar 2004 Posts: 1
|
Posted: Tue Mar 30, 2004 9:41 am Post subject: Starter question about custom functions |
|
|
Hi there, I just started with Smarty, and I can't get custom functions like cycle or counter to work. Probably I use the wrong syntax, but this is my test.php:
<?
include('smarty/libs/Smarty.class.php');
include('smarty/libs/plugins/function.counter.php');
$smarty = new Smarty;
$smarty->template_dir = "../smarty/templates/";
$smarty->compile_dir = "../smarty/templates_c/";
$smarty->config_dir = "../smarty/configs/";
$smarty->cache_dir = "../smarty/cache/";
$smarty->plugins_dir = "smarty/libs/plugins/";
// display it
$smarty->display('test.tpl');
?>
and the test.tpl:
<html><head><title>Test</title></head>
<body>
{counter start=0 skip=1}<br>
{counter}<br>
</html>
Probably all wrong, and I guess I'm missing the general idea. Can somebody help me out here? Thnx a lot |
|
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
|