Posted by veleno on February 15, 2011 at 10:42pm
3 followers
Jump to:
| Project: | Content Templates (Contemplate) |
| Version: | 7.x-1.0-alpha1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
When using contemplate to display some fields (ex CCK) it seems not to work in a proper manner.
I'm not able to display any value in the $node->content array even if I can see values in the Variables list when changing the content template.
The following code do not show anything
<?php
print $node->content['field_news_date'][0]['#markup'];
?>but i can see the content in the variables list
The whole array $node->content seems empty.
<?php
print_r $node->content;
?>Even using the new render() nothing id shown,
<?php
print render($content['field_news_date']);
?><?php
print render($node->content['field_news_date'][0]);
?>Is that a bug or I'm not understanding Drupal 7?
Thanks
Comments
#1
Visit admin/config/config/contemplate, checkbox named "Remove $node->content from variable list" must be unchecked. BUT remember, enabling $node->content array in drupal 7 requires a lot of memory/CPU available for PHP.
#2
This is NOT working correctly. I have it unchecked and there is still no content.
BTW, why is this configuration page not accessible from the standard admin menus?
#3
Flush admin menu cache.
Seems that you have other content operating module enabled. Try to check this module on clean install or with other modules which possibly may cause this disabled.
#4
Did comment #3 resolve your issue?