Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Starter question about custom functions

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Gertjan
Smarty n00b


Joined: 30 Mar 2004
Posts: 1

PostPosted: Tue Mar 30, 2004 9:41 am    Post subject: Starter question about custom functions Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP