If  I understood the problem right here is what i suggest

Split the common text into paragraphs and assign them to variables.
Create wrapper(s) for all(each) and call them when you have to output an 
HTML version.
This way you have one content into two different formats :)


Bill Moseley wrote:
> I've been told that some people are using other mail clients than Mutt
> and they prefer HTML email.  Shocking.
>
> I generate email messages with TT, of course.  And then I have a
> separate template for the HTML version.  So I have
>
>     password_reminder.tt
>     password_reminder_html.tt
>
> To stay pure I only specify "password_reminder" as the template name
> and then the code will build a mulitpart/alternative message if a
> _html.tt version exists.
>
> But, it's somewhat of a pain to maintain two very similar by different
> files.  I'd rather have a single file that generates both.
>
> Anyone have a better approach for generating both HTML and text
> versions of the same email?
>
>
>   


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to