Hi,
I am trying to achieve the following, so far without success.
Imagine, you have two types of content: event and photo
You create the "event" content with info (date, location, details, title, etc.).
At some point, this event happens in reality, you take pictures and want to upload to your website.
You create the "photo" content for them, one for each photo.
What I am looking for is to somehow associate the photos to the event, as if the even was a taxonomy term... but it is not...
The only workaround so far is this:
1. Create event called "DJ Tiesto Party"
2. Create a taxonomy dictionary, and insert the term "DJ Tiesto Party"
3. Create the "photo" node types and tag them with "DJ Tiesto Party"
It would be great, however, if step #2 could be omitted.
What modules shall I use and how to configure them? Suggestion are highly appreciated.
M.
Comments
see
see http://drupal.org/project/nat to omit #2 step
Hello, I use Views and the
Hello, I use Views and the CCK to do this using Node Reference
Here's how I've worked it.
I have content type Event
content type Venue
content type Image
I created a node reference field in Event that's limited to Venue Nodes.
I created 2 node reference fields in Image (1 Limited to Venues, 1 Limited to Events)
Now when someone creates a new picture they can choose the event and/or venue that it's related to from an autoselect field, or select list.
You can then make views to display all the images that reference a particular node.
If you're using panels to display your nodes (which I am), then I can help you further if you need.
Currently I have my Event and Venue nodes set up to show a gallery of all submitted pictures referencing them.
I also have it display All Referencing Events on my Venues page. (Events Related To This Venue).
I have this type of system set up cross referencing about 20 Content Types...
With Addnode or nodeadd widget you can set it up so that if you try to reference something that doesn't exist, it will allow you to create it from within the same page and autoreference it.
EI: Create event, try to reference a venue that doesn't exist, hit create, pop up window allows you to put in venue info, then lets you finish the event listing. Both the venue and event content types are created!
Sorry about the winded post, just trying to cover as much as possible.
OH YEAH! One more thing. When creating a view using this method in your "Argument Handling Code" section you will want to input this code:
$args[0] = arg(1);
That will allow it to pull only the events that link to the node their currently on.
Exactly what I was looking for
THank you for the detaied post!
This is exactly, what I was looking for. And the idea with panels is also great...
Edit: Now I see it's only for Drupal 5. I have started with D6. Question is, how difficult it would be to update this module to the new CCK...
-M.
Not sure about the addnode
Not sure about the addnode feature, but as for the node reference part of it (does everything accept allow the user to create and reference a node that doesn't exist). It will still allow you to do the rest.
Here's a starting guide for 6.x
http://drupal.org/node/289738
It's not done exactly the same as in 5.x, but will give the same effect.