-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
22 lines (16 loc) · 859 Bytes
/
example.php
File metadata and controls
22 lines (16 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?
# Old non-composer way
# include("SimpleTpl.php");
# $smarty = new SimpleTpl();
# First run: composer require mikjaer/simpletpl
include("vendor/autoload.php");
$smarty = new Mikjaer\SimpleTpl\SimpleTpl();
$smarty->assign("title","This is a demonstration of");
$smarty->append("menu",array("name"=>"Citron", "url"=>"http://www.citron.com"));
$smarty->append("menu",array("name"=>"Apple", "url"=>"http://www.apple.net"));
$smarty->append("menu",array("name"=>"Melon", "url"=>"http://www.melon.dk"));
$smarty->append("menu",array("name"=>"Bazinga", "url"=>"http://www.bazinga.co.uk"));
$smarty->assign("texts",array("copyright"=>"Copyright (c) 2015 Mikkel Mikjaer Christensen"));
$smarty->merge("texts",array("subtitle"=>"SimpleTpl template engine."));
$smarty->display("example.tpl");
?>