Active
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
General
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2008 at 16:48 UTC
Updated:
30 Mar 2010 at 20:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
yched commentedNot sure what's wrong with your setup, but
$node->FIELD_NAME[0]['view']is correctly populated on my test install.Note that you can now also use $FIELD_NAME_rendered variables, that contains the fully themes field (all values, with label).
See cck/theme/README.txt fro more info.
Comment #2
mrtoner commentedMust be Contemplate, since the ['view'] element becomes available when I disable that template.
Comment #3
Micha1111 commentedThere is the same problem with cck-fields in contemplates since cck rc7, but I don't no, if it is a problem of this module.
$node->FIELD_NAME[0]['view'] isn't available, only $node->FIELD_NAME[0]['value']
Comment #4
mrtoner commentedReally. Here's with Affect body output enabled:
and without:
Comment #5
yched commentedThis should be kept in Contemplate queue IMO, at least until this can be pointed to a specific part of CCK.
Comment #6
yched commentedOK, got it.
This is because in RC7 the ['view'] item is populated in the node template preprocessor - which contemplate obviously bypasses.
This is also causing #308778: token / contemplate broken - missing $item['view'], so marking as duplicate.
Comment #7
jrglasgow commentedWhen you go to edit your content type, there is a tab display fields. This allows you to specify whether your fields are viewable in your teaser or body, whether there is a label for it, etc... If the display settings for a field is set to hidden the
$node->FIELD_NAME[0]['view']will not be created, therefore this variable might exist in your list of body variables, but not exist in the list of teaser variables.The attached image shows this page.
Comment #8
liquidcms commentedat the risk of being flamed by yched i am removing this as a duplicate.. sorry
just in the process of converting over a fairly large site (170 modules and 100k nodes) from D5 to D6 and noticing that none of the fields in the node object contain the ['view'] property.
we don't use Contemplate and display settings are set correctly.
it seems to be global across all field types as there is no 'view' set for image, text, noderef and other fields
perhaps not a CCK issue; but it isn't limited to Contemplate... maybe some other module (that used to work in D5)
Comment #9
liquidcms commentedthought maybe it was some module on our site but have looked at other D6 sites and same thing - i think ['view'] property is no longer (in D6) appended to the node object.
which means all the theming functions that we call in _nodeapi('view') will need to be recoded.. :(
was there a reason this was dropped? seems pretty useful to have the rendered field available in the node.
Comment #10
liquidcms commentedok, got it.. as yched suggested above 'view' addition to the node object has moved (not sure when; i tried rc6 and still the same there).
in D5 it used to be available in nodeapi ($op = view) but if not added until preprocess_node this will no longer be the case.
i'm sure a good reason for this.. but sure going to be a pita..