On Friday 18 May 2007, A-NO-NE Music wrote:
Larry Garfield / 2007/05/17 / 01:43 AM wrote:
Musician node type: has name, website (link CCK field), etc. Also has a viewfield (CCK field) of a view that lists Show nodes that reference that musician.
While I was doing this, I encountered a problem. I created a image field for the picture next to the name of the musician. When I go to create Musician Content, the image field only let you upload the image but it is already in the library because I have used it before somewhere else. Uploading again will duplicate it. I know I am missing something, but I can't figure this out yet. Any help would be appreciate it.
If you don't want to duplicate the actual jpg file, consider image-as-node and then using a nodereference field to pick the image. There is an image.module that is very popular but also rather old, and has a few issues. Another option is to create a custom CCK node type, disable the body on it, and add just one imagefield to it. Voila, an image node type. :-) The downside here is that you're then loading more nodes on a page, so your theming could get more complex and it could have an adverse impact on performance. (Loading a node is ~4-8 queries or so on most sites.)
By the way, do I want to create Categories for Musician, Venue, and Show, or Reference Nodes between them will render Categories unnecessary?
Each node type is a type of entity. A category/taxonomy helps to classify the same sort of entity. So for instance "client" is a node type, while "paid" and "pro-bono" would be categories of client. "Album" is a node type, while jazz, rock, and disco are taxonomy terms in the "genre" vocabulary and "indy" or "big evil faceless corp" are taxonomy terms in the "contract type" vocabulary. :-) When you want something to be a node type vs. a category depends on your use case. Bear in mind that a node can only ever have one node type, while it can have many associated taxonomy terms (tags) in multiple vocabularies simultaneously, and vocabularies can apply to multiple node types. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson