Taxonomy Views filters Intersection - drupal

We have the following picture:
We have 4 taxonomy terms inside same filter and 2 articles: one tagged ideea&news and the other one ideea&business.
Now when you select ideea&news filters you get both articles as results. How can i change that, so i get the intersection between the selected taxonomy terms (so to have only results containing BOTH ideea&news)?

From your view admin page, under Advanced section. Click on Query settings: Settings and make Distinct checked.
Hope this works.

Related

Selecting multiple taxonomy terms in blog Drupal 7

I've just started learning Drupal 7 and while I was creating a blog I wanted to give it a relation but it must be related to multiple articles through taxonomy terms.
In the Blog content type, I created a relation field, set the Field Type to Term Reference and Widget to Check boxes/radio buttons.
Here is a snapshot http://varunsharmak2.com/blog-content-type.png
Now when I create a blog entry, it shows all the Taxonomy terms as radio buttons in Relation section.
Here is a snapshot of it. http://varunsharmak2.com/relation.png
I want checkboxes in place of radio buttons.
How can I get check boxes?
When you edit that field there should be an option to select how many tags can be selected? Default is one, but you can select 2,3... and finally unlimited. That field is drop-down field. Select unlimited.
Your second screenshot is not working btw.

Drupal 7 - Add a wrapper around related nodes on Taxonomy term page

On a taxonomy term page, the taxonomy term info is shown first, followed by related nodes. I want to add a wrapper div around the related nodes (ex. class="related-nodes").
taxonomy-terms.tpl.php controls the display of the taxonomy term's fields, but I'm not sure how the nodes show up. I was thinking about making a node template for the taxonomy and doing something like render($content['nodes']). However, I'm not sure what the $content key would be for the related nodes.
One approach is to enable the Taxonomy term view display (is disabled by default).
In the view config, you can add classes by clicking in Settings of Format option.
Hope it helps.
Regards.

Drupal 7 - Hide node from views_embed_view

I am using views 3 and drupal 7. I have a view setup where it will return all related articles based on the keywords which works perfectly.
The problem is that I don't want the article that I'm on to show up in the results. Is there a way to hide specific nodes from displaying? For instance, lets say I have nodes: 43908 and 43909 that I don't want to show up in the view.
I've added a filter criteria (not contextual filter) to remove these nodes, but is it possible to combine node ID's into one filter? So if I wanted to show all but 43908 and 43909 how would I do that? I've tried to add them as 43908+43909 but that didn't seem to work.
You can use the regular expression option for the nid filter. So for the nid you mention you would do:
[^43908|^43909]
This filters out nodes with nid 43908 and 43909.
As for the scenario you describe, I think a better approach would be to add a separate field to your content type, e.g. field_in_progress, a tick box only visible when editing. Then you can add a filter on that field for the view.
This article may help. It involves excluding the current node from a list view.

How to create taxonomy term count block?

I have a blog in Drupal 7 where the blog content type has a multi-select box (select drop-down box) for tagging that uses a specific taxonomy vocabulary. As such, any blog entry can have multiple tags from the vocabulary by control-clicking the terms. What I need is a block that lists the terms with the count of the number of times the term has been used
Ex:
Drupal (21)
Views (15)
Panels (18)
I also need each list item to link to a page that lists the blog titles associated with the term. I thought the first part would be simple using views with aggregation but, so far, no luck. Any idea how to do this?
Thanks
Create Taxonomy Views.
Add relationship to the node.
Enable grouping (or "Use aggregation" toggle in D7, then set the "Aggregation Settings" for each field)
Add new field 'Node: NID' and set Group type to: Count
Regards.

Drupal: How to build a categorized menu tree

I need to build a custom menu structure based on taxonomy terms. The Problem is that only the first level should be a Taxonomy-Term. All nested items must be a node. Each node can have only one Term. And Terms without any nodes associated should not appear in the menu.
How could i do that? Any suggestions for me?
Example Menu:
TERM-1
Node-1
Node-2
Node-3
TERM-2
Node-1
Node-2
...
Thank you.
Edit
I need this for a photgrapher website. Each term is a global categorie like Portraits, or Artists. Categories are only a wrapper for galleries. Based on the example Menu above a possible structure could be something like this:
Series (Term)
Bodies (Node:Type->Gallery associated with Term:Series)
Classic Cars (Node:Type->Gallery associated with Term:Series)
Surroundings (Node:Type->Gallery associated with Term:Series)
I would suggest doing this with a view. You will want to create a view which lists nodes, and set the view to group by taxonomy term.
So, create a new view (admin/build/views/add)
View Type: Node - name the view, and proceed to next page.
Filters
Node: Published - yes
Node: Type - Gallery
[optional] Taxonomy: Vocabulary = Series - this will hide galleries which have not been assigned to a Series.
Fields - delete the labels for fields as you add them
Taxonomy: All Terms - you could also use Taxonomy: Term, but if you have more than one taxonomy, such as free tagging, then those free tags would show up too, so All Terms is better because you can limit the vocab.
check the checkbox - Exclude from Display
limit terms by vocabulary - Series
Node: Title
check the checkbox - Link this field to its node
Basic Settings
Style: Unformatted
click on the cog to change settings and set Grouping Field to Taxonomy: Term
Items to Display : 0 - since you do not want a pager, you probably want to display all the results.
Sort Criteria - you will be adding two sort criteria...
Taxonomy: Weight - this controls the order for the groups - you will have to set your taxonomy term weights in the taxonomy administration area. (You could also just sort it by Taxonomy: Term if you want the terms to appear in alphabetical order.)
Node: Title - this controls the order for the nodes within each group.
Taxonomy menu trails solves this problem.

Resources