The pertinent lines of code seem to be Line 675 of flexinode.module, and Line 65 of field_textarea.inc
Logically, it seems that I could make it negate the output of content if $field->field_type was a specific number, but I have no idea how to edit to code to accomplish this, since the way the code seems to work is that it immediately inputs all fields, and there seems no easy way to change this.
( Line 686: $node->body .= theme('flexinode_'. $field->field_type, $field->field_id, $field->nullity, $node->$fieldname, $data); )
Does anyone have any suggestions as to how I might make a certain field not render? It is of course possible to do this via CSS, which is what I'm doing, but this is probably non-optimal.
Comments
any joy?
Hi Xand,
Am trying to do something similar...did you work out how to control the flexinode content?
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Ahh... as am I...
Ahh... as am I...
Any solutions?
Thanks.
as far as i got
this is as far as I got...hope it helps..
http://drupal.org/node/25055#comment-43801
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
wow.sorry i never said how
wow.
sorry i never said how i managed it.
I used CSS.
I used flexinode, created two fields, made only one show in teaser and used that field as the teaser
Both fields obviously also appear in the full view, but i used CSS to make the teaser field invisible.
this is with 4.5.* though; i don't know if it'll work with 4.6
Here's how I did it
node-flexinode-{$flexinode_type_id}.tpl.phpand fill it with something liketemplate.phpadd something like this:flexinode_image.tpl.phpput:So every flexinode image field labeled as 'Icon' or 'Header' won't be shown in body.
Obviously you'll have to change {$flexinode_type_id} and {$field_id} with the right numbers.
It's hard
So, here's my solution wihtout patching or modifying the core or the flexinode_module.
Basically you create an implementation of
theme_nodeand check there the type of the node. If the node is your flexinode then call a custom function which replicates the code of the flexinode_moduleflexinode_contentand which checks the field-names to add them to the corresponding block.Sorry, no code, can't paste it in here -- for unknown reason, suspicious data.
HTH,
Stephan