|
|
Choosing A Webhost: |
Re: New Template Object based on Existing one: msg#00007lang.perl.modules.html-template
Sam Said, > Interesting. I've never tried to associate one template with another > one, but I would expect it to work. Can you put together a small test > script that generates this error? > Doh!! I appear to be all set Sam.. I couldn't easily take my existing code out as an example as its spread across 2 modules so I spent a few mins creating a test script. When I finished, it worked just fine.. To make a long story short, the loop wasn't being properly defined due to a earlier change, the "associate" had nothing to do with it - I just had a brain lapse between making a change and trying to get something new to work. Sorry about that, but hey... Its working now :).. I'm using Sebastien's suggestion of: my $t2 = new HTML::Template(filename => "email_purchase_results.tmpl", associate => $t1, ); I have a bunch of places where (like a shopping cart) the user is selecting multiple things through multiple form pages, once its done and everything is displayed to the user for conformation/receipt, I have to email it to multiple parties (again like a shopping cart). Using the above I can now have multiple email templates which I can assign all the values of what was just displayed, add some params if needed etc.. and just send it off as a HTML email... No more logic and nothing more then a couple of extra lines of code to do emails!! Maybe nothing special to some, or should have been obvious to me - but I wish I figured this out about a year ago as I would have saved hours upon hours of specialized email creation code, never mind about 5000 db hits a day that I will just go away!! Sam, you're the man.. H::T is awesome!! Thanks -Chris ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: New Template Object based on Existing one, Sam Tregar |
|---|---|
| Next by Date: | bug parsing ESCAPE='URL', Paul Baker |
| Previous by Thread: | Re: New Template Object based on Existing one, Sam Tregar |
| Next by Thread: | bug parsing ESCAPE='URL', Paul Baker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |