From 3852f95f1fa9a94011c536dd38e795b5170b0f04 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 1 Jan 2011 13:58:44 -0500 Subject: [PATCH] doing stuff with smarty --- .gitignore | 1 + docroot/html/smarty.php | 6 ++++++ docroot/html/templates/test.tpl | 33 +++++++++++++++++++++++++++++++++ docroot/html/templates_c/.keep | 0 4 files changed, 40 insertions(+) create mode 100644 docroot/html/templates/test.tpl create mode 100644 docroot/html/templates_c/.keep diff --git a/.gitignore b/.gitignore index 2116b6c..393d8e8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ *.pid docroot/nginx.conf docroot/html/writable/*.* +docroot/html/templates_c/*.* docroot/php.ini docroot/session.save_path/sess_* diff --git a/docroot/html/smarty.php b/docroot/html/smarty.php index 181c663..df9316e 100644 --- a/docroot/html/smarty.php +++ b/docroot/html/smarty.php @@ -2,4 +2,10 @@ require_once("libs/Smarty.class.php"); +$smarty = new Smarty(); +$smarty->assign("title", "smarty!"); +$smarty->assign("bgcolor", "#aef"); +$smarty->template_dir = "templates"; +$smarty->display("test.tpl"); + ?> diff --git a/docroot/html/templates/test.tpl b/docroot/html/templates/test.tpl new file mode 100644 index 0000000..27c8c8c --- /dev/null +++ b/docroot/html/templates/test.tpl @@ -0,0 +1,33 @@ + + + + {$title} + + + +

{$title}

+
omg is this really smarty?
+ + diff --git a/docroot/html/templates_c/.keep b/docroot/html/templates_c/.keep new file mode 100644 index 0000000..e69de29