Hi,
I created a cck field that handle's my site's teasers and I have been able to call the field from other modules (i.e. pdfview, print-friendly-pages), but I can't seem to get it to work with the Forward module.
When you forward a node to an email address, it sends the teaser text in the email. I would like to replace that teaser text with my cck teaser text. Below are the methods I used with the two other modules that worked.
pdfview.module - this code places the teaser above the rest of the body content when it converts the document to a pdf file.
$content = drupal_render($node->content['field_teaser']);
$content .= drupal_render($node->content['body']);
print.tpl.php - this code places the teaser above the rest of the body when generating a print friendly page.
<div class="print-content"><?php print $node->content['field_teaser']['#value']; ?><?php print $node->content['body']['#value']; ?></div>
but.........
the Forward Module has two parts to its email teaser generation. The first part is in forward.module and the second is in forward.theme
forward.module
else {
$nid = $edit['nid'];
$emailtype = 'email';
//Get article information.
$content = node_load($nid);
$content->teaser = check_markup($content->teaser, $content->format, false); //The line i'm trying to modify
$returnurl = drupal_get_path_alias('node/'. $nid);
}
forward.theme
<div class="article">'.$vars['content']->teaser.'</div> //The other line im trying to modify
So I've tried so many different things, but I can't seem to get it on this module.
I know just enough php to get me into trouble, or to help me fix things by trial and error =(
Any help is highly appreciated =) Thanks in advance!
Comments
Comment #1
diovi commentedhmmmmm.......
Comment #2
diovi commentednevermind, my trial and error skills have come through. I had to do a print_r but for anyone who has this trouble in the future here's the solution (and you don't need forward.module)
#1 Open forward.theme
replace this code
with this code
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.