Memorial Day
Support will be closed on Monday, May 28th, 2012 to enjoy Memorial Day with our friends and families.
   
1 of 3
1
“Separate” Custom Fields & Field Groups
Posted: 13 April 2011 10:24 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  48
Joined  03-25-2009

There are situations where you have one custom field that will be used in multiple field groups, like a Body WYSIWYG field. An alternative to duplicating the field for every field group would be to use Gypsy or Drifter.

A nicer solution might be to separate custom fields so you build all of your custom fields independent of field groups. Then when you create a field group, you pick and choose which custom fields you want to include.

Profile
 
 
Posted: 13 April 2011 10:38 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  126
Joined  07-02-2008

I support this thread.

Profile
 
 
Posted: 13 April 2011 10:40 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  16
Joined  02-23-2011

+1

Profile
 
 
Posted: 13 April 2011 10:41 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  119
Joined  07-18-2010

+1. Brandon Kelly has quite the article on this:

http://brandon-kelly.com/blog/custom-fields

Profile
 
 
Posted: 13 April 2011 10:44 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  48
Joined  03-25-2009

I knew I remember reading something about it a while ago, but couldn’t remember where from. Thanks for linking to that. I don’t even care if the interface is all that nice from the start; I just want the functionality to build field groups from all custom fields.

Profile
 
 
Posted: 13 April 2011 10:46 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  109
Joined  07-16-2010

+1

 Signature 

Rob Hodges
——————-
Electric Putty
http://www.electricputty.co.uk
http://labs.electricputty.co.uk

——————-
Better Workflow - EE add-on for entry drafts, approval workflow and live preview

Profile
 
 
Posted: 13 April 2011 10:46 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  131
Joined  02-05-2008

+1 smile

 Signature 

rebecca :: littlered media :: expressionengine pro net :: super mom :: i’m in pradipta’s rolodex

Profile
 
 
Posted: 13 April 2011 10:48 AM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  04-23-2007

+1

Profile
 
 
Posted: 13 April 2011 10:48 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  347
Joined  06-03-2009

Like having members in multiple member groups, this would require a huge architectural change. In other words, don’t hold your breath. Maybe in EE3? smile

But seriously, I have gotten used to this and actually now prefer to not re-use fields in different channels. I like to namespace my fields with the name of the channel (like news_body) and just take the extra five minutes to create a similar field in a different channel, like blog_body.

 Signature 

http://robsanchez.com
http://twitter.com/_rsan
http://github.com/rsanchez

Profile
 
 
Posted: 13 April 2011 10:49 AM   [ Ignore ]   [ # 9 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1433
Joined  03-05-2008

+1 but there must be a reason behind why this is not done - otherwise i can see no logic for it to be done this way at present.

 Signature 

ModeTen Designs - @ModeTen - Stock Photos & Vectors

Profile
 
 
Posted: 13 April 2011 10:51 AM   [ Ignore ]   [ # 10 ]  
Grad Student
Rank
Total Posts:  48
Joined  03-25-2009

@Rob-
Re-using fields makes it soooo much easier to write global RSS feeds and reusable templates. I know it’s a big architecture change, but it doesn’t seem impossible.

Profile
 
 
Posted: 13 April 2011 10:52 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  206
Joined  12-06-2007

I’m with Rob on this one…

i used Gypsy in EE 1.0 and it got confusing, i also like to prefix fields with the channel name i.e. news_body and think that’s a clean approach, although it would be nice if EE allowed for duplicate names on different channels, i.e. i could use the field name body in my news channel and event channel, that could save some time playing with templates to ensure they have the correct field name.

 Signature 

We’re hiring a PHP / JavaScript Developer

Web & Mobile application development
Follow me on Twitter
Codeigniter Linkedin Group

Profile
 
 
Posted: 13 April 2011 10:53 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  176
Joined  09-15-2008

+1

Profile
 
 
Posted: 13 April 2011 10:56 AM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  347
Joined  06-03-2009

To alleviate that, I would do something like this:

{preload_replace:chan="news"}
{exp
:channel:entries channel="{chan}" limit="10"}
<h2>{title}</h2>
{{chan}_body}
{
/exp:channel:entries} 
 Signature 

http://robsanchez.com
http://twitter.com/_rsan
http://github.com/rsanchez

Profile
 
 
Posted: 13 April 2011 10:57 AM   [ Ignore ]   [ # 14 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1433
Joined  03-05-2008

@matthew - that is kind of the point - if you were allowed to have one field in two channel groups, there would be no need for the prefix, as you would not be replicating it! I too currently do this, but not out of choice!

 Signature 

ModeTen Designs - @ModeTen - Stock Photos & Vectors

Profile
 
 
Posted: 13 April 2011 10:57 AM   [ Ignore ]   [ # 15 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  206
Joined  12-06-2007

@Rob, cheers for that never thought about doing it that way smile

 Signature 

We’re hiring a PHP / JavaScript Developer

Web & Mobile application development
Follow me on Twitter
Codeigniter Linkedin Group

Profile
 
 
Posted: 13 April 2011 10:58 AM   [ Ignore ]   [ # 16 ]  
Grad Student
Avatar
Rank
Total Posts:  44
Joined  10-14-2008

Rob, that is genius and yet should have been so obvious

 Signature 

web - http://bydreamtime.com
twitter - http://twitter.com/dreamtime

Profile
 
 
Posted: 13 April 2011 10:59 AM   [ Ignore ]   [ # 17 ]  
Grad Student
Rank
Total Posts:  48
Joined  03-25-2009

@Rob-
Makes total sense, but you shouldn’t have to do something like that if the body field in news and events are exactly the same.

Profile
 
 
Posted: 13 April 2011 11:01 AM   [ Ignore ]   [ # 18 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  206
Joined  12-06-2007

@nevsie I suppose, but there’s always times where you want to change a field for a specific channel in some way then you realise you’ve got it shared across multiple channels and then you’re screwed…

 Signature 

We’re hiring a PHP / JavaScript Developer

Web & Mobile application development
Follow me on Twitter
Codeigniter Linkedin Group

Profile
 
 
   
1 of 3
1