I have an Ajax script handler where I load $nodeId and $nodeId default result (full):
$node = node_load($input); $prerendered_node = node_view( $node, 'default' ); ...
Now I need to display the teaser (final or cropped).
I have tried this so far, without success (the resume is filled with content):
1. $item = $node->body['en'][0]; $output = field_view_value('node', $node, 'body', $item, 'Teaser'); echo $output; (blank) 2. echo $node->body['eng']['0']['summary']; (blank)
The solution is from this question, but does not work:
3. $output = truncate_utf8(strip_tags($node->body['eng']['0']['summary']),200,true,true); echo $output; (blank)
Curiously, var_dump($node->body['eng']['0']) and an array containing value (bodies), summary , clean_summary and other elements are clean_summary , and summary has the necessary value. But, as in example 2, I can not directly access it, it appears on the screen.
Tips, please?
Thanks.
source share