3

I'm a firm believer in the single custom field group approach, but it can be irritating that, when adding a custom field to a shared custom field group, all publish layouts automatically display that custom field. Have you found any techniques/addons to solve this?

  • This bugs the hell out of me too. The hack you offer below is worth knowing. – Jonathan Schofield Nov 27 '12 at 15:56
  • Thanks, yes thank goodness it was a fairly easy hack. – Richard Frank Nov 27 '12 at 19:47
3

I have used a core hack to solve this, but I am hoping to see better solutions.

Around line 1400 of system/expressionengine/libraries/api/Api_channel_fields.php change

$field_info['publish'][$insert_id] = array(
'visible'        => 'true', 

with

'visible' => 'FALSE',
| improve this answer | |
  • How have you got on with upgrading EE core on sites that use this little hack? – simonhamp Apr 22 '16 at 11:16
  • For EE v2.11.2 it's moved to line 1488 and is now a boolean rather than a string like this: 'visible' => false, – Patrick64 Jun 22 '16 at 9:32
2

Short of writing an extension to override the default setting of making fields visible you would need to go with your core hack.

You have to think about it from the standpoint of how most users use EE under normal circumstances. Most people would create a field for a particular channel and be happy that it is now showing up in the publish section. The same goes for something like the disable parameter in the channel entries tag and similar. It makes more sense (IMO) to have an enable parameter and only enable the things that I need per tag element. The likely hood of that happening though is going to be pretty slim though if for nothing else then backwards compatibility reasons.

| improve this answer | |
0

Indeed, very annoying and in my opinion a bug. I don't know of any way to undo this behavior.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.