I updated the "Email Customer's Receipt" example considerably. It retrieves business, receipt header, and receipt detail information from a SQL Server database.
I made most of the changes to the ASP code, and added T-SQL code to create tables and insert data into the example db_dermistest database. I included some code which should prevent SQL injection, as well.
If you're interested in a fairly complete example of using Dermis to email an invoice with information pulled from SQL Server, there you go. I hope it proves useful to you!
Thursday, March 18, 2010
Subscribe to:
Post Comments (Atom)
Thanks very much for continuing work on this. I plan on using it very soon in a big way. I have a legacy CMS that I've been developing on and off over the last 10 years that's just crying out for a decent templating system. I'll keep you posted, but for now I just wanted to say thanks heaps!
ReplyDeleteHi,
ReplyDeleteThanks for your work on this, do you have any documentation or "getting started" docs for this? I can't seem to find them.
thanks
What if I want to include a stylesheet inside the template file for a dynamic template styling, for example:
ReplyDeletefont-size: { $Font_Size };
color: { $Color };
Hi Mikey,
ReplyDeleteSure thing! I hope it proves useful for you. Suggestions for improvements are welcome, too!
Hi John,
ReplyDeleteIf you navigate to dermis/docs/default.htm, click the "Quick Installation, Setup and Test" link on the left.
Does this answer your question? ... or are you looking for more of a tutorial? I'm not sure if I'm really answering your question.
Hi Anonymous ("include a stylesheet inside"),
ReplyDeletePerhaps something like this will work:
objT.assign "Font_Size", 12
objT.assign "Color", "red"
Hi Anonymous ("include a stylesheet inside"),
ReplyDeleteUpdate:
I knee-jerked that response. After thinking about it for a bit, I have a solution, but not a pretty one.
Right now, the only way is by using {$smarty.ldelim} and {$smarty.rdelim}. I'll work on that.
<style>
body {$smarty.ldelim}
font-family: "Palatino Linotype","serif";
font-size: {$smarty.ldelim} { $Font_Size } {$smarty.rdelim};
color: {$smarty.ldelim} { $Color } {$smarty.rdelim};
{$smarty.rdelim}
</style>
Hi William,
ReplyDeleteI'm the one who sent a question for StyleSheet and categories/articles issue, I found {literal}{/literal} in your docs to ignore template code and it also worked for me, thanks!
I sent you the last message in docs post and I'm waiting to receive an email from you.
Best Regards
Kasem
Hi Kasem,
ReplyDeleteI created a forum for Dermis users: http://forums.williammeitzen.com. Kindly post your questions and correspondence there. Thank you!