Forums / Developer / XHTML-Tags & EMails
Pascal von Büren
Friday 29 April 2005 6:15:47 am
Hi there,
I'm currently trying to develop an extension that allows sending a specific node by plain email.Everything works fine but some <i>distracting</i> XHTML-Tags occuring in the mail's body.
I'm using <b>attribute_view_gui</b> to show the node's attributes, so i can't use <b>wash</b>, which was my first thought. Specifying <b>view=plain</b> as parameter doesnt' show any difference either.
My current workaroung uses strip_tags() on php-Level of my module, but a solution using templates definitly would be prefered.
Has anyone done such a thing before and could provide me with a hint?
Thanks for any kind of help,
Pascal
Xavier Dutoit
Sunday 01 May 2005 7:59:15 am
Hi,
Why aren't you using either tipafriend or informationcollector ? Might be easier than developing a new extension, isn't it ?
About your "distracting" xhtml tags, could you give us more infos ? It might be simply a matter of changing the template used by attribute_view_gui.
X+
http://www.sydesy.com
Monday 02 May 2005 12:31:06 am
Hi Xavier,
I'm trying to extend <b>tipafriend</b> to send all information available to the sent node, not only a link refering to it, so it'd be an extended tipafriend-solution.
The problem is, that I can't use plain templates with attribute_view_gui, sent mails always have the standart templates for all attributes, so especially with Textarea, all the paragraphs, html-entities and so are displayed in the mail's body.
Looking at the notification template, i tried the following code to select plain templates:
{attribute_view_gui view=plain attribute=$attribute}
Maybe it's just the <b>view</b>-parameter that should be changed?
Thanks,
Monday 02 May 2005 6:30:30 am
Modify the tipafriend template, so you can send as many information as you want.
Daniel Beyer
Friday 01 July 2005 7:37:56 am
Hi Pascal,
instead of using
just use this:
{include uri=concat("design:content/datatype/view/plain/",$attribute.contentclass_attribute.data_type_string,".tpl") attribute=$attribute}
Daniel Beyer _________________________________ YMC AG Kreuzlingen, Switzerland web: www.ymc.ch ____________________________________