By doomed on
Good evening,
What i have:
I'm doing some work on a website about a sports team.
I have a custom content type called Players - this is used to create player profiles.
I also have the default content type Stories - this is used to publish News items.
What i want:
The player profiles are pretty static and i thought of having a list of related news items (Stories) on them.
This means everytime i create a new Story, besides filling the regular fields i would have a (dynamic) list of Players that I could tick from.
The end result would be:
- a normal Story being posted on the front page.
- a link being posted on the Players profiles that were ticked (this could be on a block).
How can i achieve this?
For now, i'm only looking for general ideas on how to do this. Is there a module that will do everything?
I have CCK and Views installed and working.
Comments
Node reference
You can use "node reference" to do that. It will show the node title for you to choose from.
You can customize by creating Views such as showing thumb image of the player instead.
btw, node reference is in
btw, node reference is in CCK
Thank you! This seemed easier
Thank you!
This seemed easier than i thought so i tried right away.
The first part went ok, and now all my Stories have a "nodereference field" that lists Players - This is perfect (views with thumbs included)!
Then i went and created a View (as a block) that is supposed to list specific news Stories for each Player (on his own page).
But currently its showing all stories that have a reference.
I'm sure i'm missing an argument or something, i just dont know which one.
Here's a screenie of the View as it is:
http://img3.imageshack.us/img3/7441/creatingaview.gif
Use Views for Part 2
Nodereference is the way to go.
You can then use Views to generate a block containing a list of all the news stories that reference a particular player. Set that block to display only on Player node pages and you're set.
Hey grobemo, We posted almost
Hey grobemo,
We posted almost at the same time..
I did that already and as I say on my post above ( http://drupal.org/node/425886#comment-1445934 ) i need to limit the shown Stories to those related to the Player i'm on.
As it is, its showing every Story with any Player reference.
Add an argument for "User:
Add an argument for "User: Uid", and for "Action to take if argument is not present", select "Provide default argument". Choose "User ID from URL" as the default argument type.
I'm not sure if you have to use any Validation options, but this should get you on the right track.
Hmm user id? Are you
Hmm user id?
Are you sure?
I'm not playing around with the users.
Players in this case are a Content Type.
*bumping* for greater justice
Hello everyone,
I'm still looking for a solution for this.
In case you didnt understand before:
What I have is:
- My Story content type has a field for referring Players (there is a content type called Player).
- When I do refer a player, the story shows proper links at the end, this is OK.
What I still need:
- When visiting Player pages, I need backlinks to all the news stories where he was mentioned. How can i achieve this?
_
Either with the nodereferrer module or with the "backlinks" view provided with the views module.
I found out about
I found out about nodereferrer module.(after too many searches on Google), tested it, and it works.
So i came here to report and now i see your reply WorldFallz !! :)
Now I also tested the Backlinks view and it also works nicely. I had no idea this was builtin in Views.
Only "issue" is it depends on the search engine which depends on cron being run (not really a problem).
By creating a view
By creating a view that has a node_reference argument (which in your case would be the player node id) and lists the story nodes.
You can embed the view in your node.tpl.php (probably best to create one just for player profiles so something like node-player.tpl.php) using the following code...
Alex Pott