I am trying to add some of the content from the "body" field into my teaser. I assume i would use the variable:
$node->content['body']['#value']
although this variable only holds the data:
<p><br class="clear" />
even though there is 3 paragraphs of text in the body field.
ideally i would like the std drupal "teaser" concept of just adding the first 600 char or so of the body field but since i have also used contemplate to theme the full page view and i have put images in the top of the full page; the $node->teaser variable is no longer usable in the teaser. I think there is built in Drupal function however to give me a smart clipped portion of a string (i.e. the body) - but alas - i seem to have no BODY content.
Peter Lindstrom
LiquidCMS - Content Management Solution Experts
Comments
Comment #1
liquidcms commentedsorry my point about using teaser was explained wrong.
Since i am using contemplate to redefine the teaser - i can no longer use the $node->teaser variable inside the teaser template. In other words once i use contemplate to redefine the teaser it is no lnger the std drupal "teaser" of 600 char of the "body" field.
although original issue still is correct - the "body" field in my teaser template is empty
Comment #2
liquidcms commentedok, nevermind.. it seems that it was only one node that was showing body as empty and it seems like it may have been caused by Tiny throwing a pile of useless span tags into the opening paragraph. Still not sure how this could delete almost all the content from the body variable - but cleaning up the content of that field has fixed the issue.