How to set taxonomy terms' meta tags in drupal, to display relevant nodes' title in the description meta tag - drupal-7

I have a drupal site and i use some taxonomy terms.
I use these taxonomy term pages to display those nodes having the relevant term.
As an example I have a taxonomy term Cars and in /cars page, are being displayed the nodes with term car.
Like Audi-BWM-Ford.
I need to configure - taxonomy terms pages- meta tags, and i need in the description meta tag area displaying the nodes' titles of each term.
Is there a specific token that can do that? Or any other way?

Drupal nodes are content objects, they are not supposed to be used to display meta informations for taxonomy terms.
If you really want it this way, you'll have to write some code.
I suggest you take a loot at this module: https://www.drupal.org/project/metatag
You'll learn how to assign metadata to taxonomy term pages
Then, you'll have to query you database to retrieve your node titles and set them as a meta.
For most cases metatag module should be enough.

Related

Drupal 7 Views: display tagged content where the url is equal to a taxonomy term

I am having trouble wrapping my head around this one.
I have a taxonomy vocabulary called "industry" with various terms.
I also have a content type called "customers". For each customer I have tagged them with the relevant industry term.
I am trying to create a view that will check the url and if a term from the vocabulary is present, display all relevant customers.
So if the url is: categories/industry-group/insurance
Then the view should show all insurance customers.
I am guessing this has to be done by combining Contextual Filters and Relationships but I can't figure out how.
Update1 1:
Under fields i have:
- content
- Taxonomy Term: ID
- Taxonomy Term: Name
Under Contextual Filters:
- Content has taxonomy term ID (here I am using the raw url and using the 3rd parameter)
Under Relationship:
- Entity reference: industry
The hardest lesson for me to learn is always the same one: patience and reading go a long way.
I figured this out.
Under contextual filters I needed "taxonomy term: name"

drupal commerce browsable catalog

I am finding some troubles how Views works with taxonomy terms. I hope you can help me. :-)
I am building an e-commerce site with Drupal Commerce since it has all features I need for my project requirements but I don't know how I can list terms and nodes belong to concrete taxonomy on Views.
I have a product hierarchy taxonomy with all the site product categories. I use Taxonomy menu in order to show this taxonomy in a menu block allowing the user to select any term. A product display node only can be referenced to a sheet term on the taxonomy tree.
I want to use Views by listing as terms as nodes, if the user click on a non-sheet term on taxonomy menu, the view should show the subterms from clicked term. But in the other hand, if the user clicks in a sheet term then the view should show nodes referenced to the clicked term.
For instance,
Let's imagine I have the next taxonomy menu:
products
term1
term1.1
term1.2
node1
node2
term1.3
term2
node3
node4
If the user clicks on term1 term the view should list term1.1, term1.2 and term1.3 but if he/she clicks on term1.2 it should list node1 and node2.
How can I do this on Views? How can I list two different types of entities depending what term is clicked?
Thanks in advance!!
You need some js to do this. So you can use the dHTML_menu or similar dynamic menus.

Marking one article as Featured to show on the Taxonomy Landing Page in Drupal 7

On my Taxonomy (Category) Landing Page, I am listing all the articles in the chronological format. But I also want to show one Article (that I select) or a latest one as a Featured Article on the Landing Page. With the Featured Article, I'd show the following Custom Fields within the Article:-
Featured Image
Title
Couple of other custom fields
My question is how to do it with a probable customized loop or any module?
Create a view (block) and setup your fields.
Add a Taxonomy Term ID Contextual Filter
Choose "Provide Default Value" in the "WHEN THE FILTER VALUE IS NOT AVAILABLE" section
Choose "Taxonomy term ID from URL" in type.
Save the contextual filter and then save your view.
Have the view block display on the taxonomy term pages.

Show list of users based on taxonomy term (D7)

I have a taxonomy vocabulary "Department". In the user account I have a taxonomy term reference field with this vocabulary. So each user can be assigned to one or more departments.
I used the module Taxonomy Meny to show the taxonomy terms in my main menu.
Now I want to show a list of users when I click on a department in the menu.
Does anybody have an idea how I could do this?
Thanks.
Note sure here, but I suppose you should be able to use the views module to achieve this. Use can show all user nodes (or a list by choosing fields) and enter the department as a contextual filter.
Uou can use views in 2 ways, to produce pages or blocks. Contextual filters are a bit easier with pages, but that might confilt with yout module.
I like this tutorial, it gives a clear insight in contextual filters. It should get you started.
http://www.metaltoad.com/blog/using-drupal-contextual-filters-views

Drupal 7 - How do I use pathauto taxonomy terms in views arguments

I have been banging my head against this problem all day. I'm using Drupal 7, and I'm trying to create a contextual filter that uses the pathauto string for a taxonomy term, not the taxonomy term ID.
So, I can make this work:
http://foobar.com/tags/1
But not:
http://foobar.com/tags/tagname
I have created a contextual filter of 'Content: has taxonomy term ID'. I have turned on the default taxonomy view and modified the path in it to try to create a URL that will work. I have gone into /admin/config/search/path/patterns and modified the taxonomy term path. As a result I can make the numeric ID appear in almost any URL with any prefacing text, but I can't get my view to use the pathauto-generated string for a taxonomy term instead of the taxonomy ID.
Any ideas? Am I missing something? All help is appreciated.
--Marshall
The default view "Taxonomy term," is using a contextual filter very similar to what you are trying to achieve, so possibly this could assist you in how to set something like this up. I would try creating a view of type taxonomy instead of content though.

Resources