TIp a friend

Author Message

Bill Rust

Friday 09 February 2007 8:38:07 am

Ok, I've got the tip a friend feature running on my site (eZ 3.4.4) but I want the whole article to be emailed to the friend and not just the link. Am I right in assuming that the template I'm after is tipafriend.php? Any tips for getting it to do what I want it to do?

Many thanks

Softriva .com

Friday 09 February 2007 10:24:03 am

Here are your tpls
tipafriendmail.tpl tipafriend.tpl

located in
design/standard/templates/content

hope this helps

Bill Rust

Monday 12 February 2007 6:56:32 am

Great, I've found those templates so all I now need to do is figure out how, with my basic PHP skills, to get the whole article to be emailed!

Claudia Kosny

Monday 12 February 2007 12:14:55 pm

Hi Bill

I am not sure whether it the same for eZ 3.4.4,but on eZ 3.8.3 the variable $node_id is available in the template tipafriendmail.tpl and in the template itself the node_id is used to fetch the node object itself.
So the only thing you need to do is to add the html for the display of the node to the tipafriendmail template. No PHP is needed, just template language like for every other template. Just have a look at the other templates you use to display a node to get a good starting point.

Good luck

Claudia

Bill Rust

Monday 19 February 2007 5:22:59 am

Ok, many thanks for that Claudia, you now have me on the right track.

I still have a couple of problems however. All emails sent all include the paragraph.tpl file from design/standard/templates/content/datatype/view/ezxmltags/ This, of course, gets translated from a html paragraph break to <p> tag on the emails. How would I get around excluding the paragraph.tpl from the tipafriend section? Could I make the tipafriend section html friendly?


{$node.object.data_map.title.content|wash()}
{$content_object.published|l10n( date )})
{attribute_view_gui attribute=$content_version.data_map.thumbnail image_class=medium alignment=right}
{section show=$node.object.data_map.intro.content.is_empty|not}
{attribute_view_gui attribute=$node.object.data_map.intro}
{section show=$node.object.data_map.body.content.is_empty|not}
{attribute_view_gui attribute=$node.object.data_map.body}

Claudia Kosny

Monday 19 February 2007 1:25:49 pm

Hi Bill

I don't know whether this is possible. Apart from that I am not sure what you mean by html friendly - imho a <p> tag is very html friendly.

Claudia

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.