Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
General
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2008 at 14:45 UTC
Updated:
24 Nov 2008 at 15:22 UTC
Is it possible to set up a content type with CCK fields where the input/edit order of display is different from the output order?
I have a site in development where some articles have extra facts which are being included on some stories using a CCK text field. Since these are not included in all articles of any given type, I want the main body input area to be above the extra input fields for other details. However, I don't want the fields to appear below the main body when users are reading articles.
Is this possible without needing some complex theming for each content type?
Comments
Comment #1
yched commentedNot possible out of the box. At some point, it would be good to have per-context field weights (forms + display, or even form + full node + teaser + rss + ...)
Won't happen soon, though, and possibly not in the D6 cycle :-(
For now, you need to set your own order on display using node templating : check all 'exclude' checkboxes on 'Display fields' screen, and use the $FIELD_NAME_rendered variables in your node template to print the fields in the order you want them.
See the 'Theming CCK fields' topic in CCK's advanced_help pages.
Comment #2
mpettitt commentedThat's a shame. Oh well, will just have to do some fiddly theming then - I was hoping to avoid that!
Comment #3
yched commentedComment #4
mpettitt commentedYou mention about checking 'exclude' checkboxes on the Display fields screen, but there are no checkboxes on that page of my install. There are just drop downs, which I've tried in all four settings: Default (appears at the bottom), Plain Text (appears at bottom with no formatting), Trimmed (appears to be the same as Default) and doesn't appear at bottom, but it doesn't provide the $field_inset_rendered variable either.
For the first three, it would appear to be a matter of disabling the normal output as well as allowing the $field_inset_rendered output, which appears as the normal output does. For the last one, it would need for the rendered output to be generated despite it not being rendered by the normal code.
Any ideas?
Comment #5
yched commentedBe sure to use 2.0 release. The 'exclude' checkboxes were not in RC10.
Also, the $FIELD_NAME_rendered variables are available no matter what. Simply, if you use them and don't 'exclude' the field, the field's outupt will be in both $content and $FIELD_NAME_rendered and will be displayed twice.
Closing, please reopen if needed