I am currently using RC7 for my site. I am using contemplate to create custom layout for my custom nodes created using CCK. Hence I've created node-recipe-body.tpl.php in sites/all/contemplate directory, where 'recipe' is the node type I have created. One difference I have seen between RC7 and 6.x-2.x is that the $node->field_xxx structure has changed.
For example, to print the field value of notes field I would do something like:
<div class="recipe-field_notes-label">Notes:</div>
<div class="recipe-field_notes-value">
<?php print check_markup($node->field_notes[0]['value']) ?>
</div>
I also notice that there are other values available, in RC7, I see another value ['safe'] and in 6.x-2.x-dev version I see ['view'] in addition to ['safe'].
My question is:
What exactly is the purpose of these values?
Can I use $node->field_notes[0]['safe']? and avoid having to call check_markup? Does that mean that the filters are already run on this? Also, what is the newly introduced ['view'] value in 2.x-dev version?
Some explanation would be helpful.
Comments
Comment #1
yched commentedWe cannot provide support for contemplate.
The ccck/theme/README.txt has detailed information on custom theming, though.
Comment #2
yched commentedComment #3
profix898 commentedcck/theme/README.txt doesnt mention the purpose of the three different fields (
$item['view'], $item['safe'] and $item['value']). Would be really good to know though ;)The problem is that nobody knows exactly what field to use in output. I guess the contemplate people are also confused about this. And even as a module developer you dont know what field to alter in hook_nodeapi, because everyone uses a different variant in his/her theme. Can anyone (CCK developer) please give a short explanation? Please!