description not printed -- must call node_prepare()
dww - March 7, 2007 - 01:01
| Project: | Decisions |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | dww |
| Status: | closed |
Jump to:
Description
once you implement hook_view(), node_prepare() (which handles filtering and putting $node->body or $node->teaser into $node->content) is not called automatically. so, to actually display the decision's "description" field in decision output, you need to call node_prepare() yourself. attached patch does this. i also set this field's weight in the content array to -1 so the description would come before all the voting-specific goo. that seemed like the most clear and intuitive placement, but feel free to rip out that line if you'd rather it shows up at the bottom of the page if you'd prefer.
| Attachment | Size |
|---|---|
| decisions-body.patch.txt | 813 bytes |

#1
i found anarcat in IRC, who reviewed and committed this (to both HEAD and DRUPAL-5). thanks!
#2