Drupal related articles view with list of nodes to exclude from results - drupal

I'm trying to create a list of related articles in Drupal, based on shared tags. I've used this solution and it works great:
Creating list of similar nodes in Drupal 7/Views 3
However, I wish to expand on this and exclude certain nodes from the related view which are not relevant. I have a node reference field (field_exclude) for the article which allows the user to select which nodes to exclude.
I just need to update this related view to exclude any node ids found in field_exclude. Any idea on how I update the view to add this functionality?
Thanks.

Add a Filter Criteria for the field_exclude and there set the "Not empty" value or any other value that wil do the job.

Another solution here is to use the NodeQueue module where users can add nodes in lists/views.

Related

Drupal - Edit Views Selective Filters module to rename the option tag

Actually, I try to make a filter criteria who list the available "structures" in my view. I'm using the Views Selective Filter module who does what I want. But in that list, that show the id of my structure and not the name. (I can't show you with an image, actually)
I want that my "structures" name replaces the id in my list (but not the value).
If you have any idea, I would be very grateful.
I found a solution.
I have edited the Views Selective Filter module to allow him to detect and load my structure name.
After that, I just have to change the text of my option before that the id has assigned in.

Is there any module which list the related nodes based on the title , So that the user can set multiple related node

Is there any module which list the related nodes based on the title , So that the user can set multiple related node.
i want to display related songs based on title without using taxonomy.
like http://www.djcity.com/digital/robin-thicke-give-it-2-u-viol8tor-trap-remix---32213.htm
any body help me...
I think its the best module: https://drupal.org/project/featured_content
But if you want more alternatives, visit this url: https://groups.drupal.org/node/12347
I hope the information has been useful.
Regards.

Add view filter to retrieve content associated with one or more Taxonomy Term IDs

I have created a Drupal 6 view which has two "Taxonomy: Term" (Term ID) filters, for two different taxonomy terms. I need to create a feed that pulls content that is associated with a OR b, or that is associated with a AND b. Currently, nothing is displayed because it seems that the logic of two filters is AND, not OR.
How do you pull content that has the logic OR with Drupal views?
It does work if there is only one filter, but as soon as I add a second filter, zero records are found.
The OR filter is not built in to Views2. For ways to get around this, see http://groups.drupal.org/node/16173. And this old post might help as well OR operator in Drupal View Filters

Drupal view to list nodes and comments

I want to create a view that shows the latest posts in a forum and also any latest comments. The comments and the posts would all show in the same view. Is it possible for me to do this?
Thanks in advance,
Ben
In essence: no. Views requires you to choose one main resource in the first step: you there (amongst others) choose to go with either nodes, or comments.
However, with some (ugly) configuration, you can load the comments that go with nodes. Each result would look like, Node - Comment, e.g.:
Can I have cheesburgers - First!
Can I have cheesburgers - No, I was first!!!111oneone
Can I have cheesburgers - LAME.
and so on. With some styling, you can then get it to show comments and nodes in separate rows.
However, this is ugly and hackish. My advise: write a simple module that either exposes a block, or a menu+page, and do two simple (and light) queries on the database: SELECT nid, title, ... FROM {nodes} LIMIT 10 and SELECT nid, name AS title, ... FROM {comments} LIMIT 10 then mix these two up. Or, with some (more complex) SQL magic, you could even join the two tables and create fancy results that e.g. order by created date of either nodes or comments.
With Drupal 7 you can add a relationship Last comment and then add that field to the view.
One idea I've seen is to use Views Custom Field to "attach" a wholly separate view with PHP code. See comment #4 for the code (in a request for this feature in Views. for a code example).

Drupal Custom CCK field with multiple child fields

Is there a way of creating a composite field that can have multiple values, with each value having another group of composite values?
E.g. we want to have this structure at the end:
Group 1 (unlimited number of groups)
Child field (unlimited children for each group)
Child field
...
Group 2
Child field
Child field
...
...
Is this possible at all for a custom module that defines a CCK field? If so, can someone push me in the right direction?
this is a very know and debated issue in the drupal world.
this feature is called cck "multigroup" and it looks it's pretty difficult to implement.
there are a lot of posts in the drupal forum about this, i suggest you to start here:
http://drupal.org/node/494100
it's a kind of "hidden" feature in the cck module. looking in the module directory, you will find instructions here:
cck/modules/content_multigroup/README.txt
Edit: Ongoing work on the multigroup module has moved to the experimental
CCK 3.0 branch.
in the meantime you can try to deal with it using the flexifield module
(but it's kinda hackish, i won't use it in production)
I ended up creating my own "Cost/Product" CCK compound field based on this excellent tutorial with example modules: http://poplarware.com/es/articles/cck_field_module
I haven't figured out yet how to pull out a specific sub-field, such as cost, in Views. I only get the entire ": $" compound.
For Drupal 7+, you probably want to check out the Field collection module, or Field group if multiples aren't necessary.
This issue is pretty old, but I just happened across it. I would think the way to handle it for now would be with a second cck type for the children, and the groups as a node_reference field. So you'd have:
MasterType
group field
unlimited per node
each one, a reference to a ChildType node
ChildType
child field
unlimited per node

Resources