Questions tagged [taxonomy-terms]

"Taxonomy" refers to Drupal's content classification mechanism, organised into vocabularies and terms.

Filter by
Sorted by
Tagged with
7
votes
0answers
145 views

Splitting Atom categories into two fields

I am using Feeds to import an Atom feed into my site. The feed has categories as <category term="cat:Foo" scheme="http://www.sixapart.com/ns/types#category" /> <category term="tag:foo" ...
6
votes
1answer
12k views

how to get parent tids of a taxonomy term [closed]

I used this code to get the parent ids , but the result is a huge object . how do I get the parent id's and term names from the resulting object ? $ancestors = \Drupal::service('entity_type.manager'...
6
votes
3answers
4k views

How to grant a role permission to edit terms in a specific vocabulary [closed]

Is there a way/module to grant a role permission to list and edit terms in a specific vocabulary?
6
votes
2answers
2k views

Add field to vocabulary itself

I have a situation where I would like to add a field to a vocabulary itself. In other words, I need an editable field on the form that normally appears at /admin/structure/taxonomy/my_vocabulary/edit ...
6
votes
3answers
10k views

Get custom fields assigned to taxonomy

How to get custom fields assigned to taxonomy in Drupal 8. What I have done so far is: $contact_countries = \Drupal::service('entity_type.manager')->getStorage("taxonomy_term")->loadTree('...
6
votes
5answers
301 views

How to show specific views for certain combinations of taxonomy terms?

I have searched and not been able to find anything related to this specific situation. I would like to show specific views for certain combinations of taxonomy terms in Drupal 7. I have three ...
6
votes
2answers
7k views

Is it possible to automatically add a taxonomy term for a content type?

How is it possible to automatically add a taxonomy term for a content type? Is it possible to make the new added terms children of this automatically set term? I have a content type intended for ...
6
votes
3answers
4k views

Duplicate taxonomy terms from view

So I haven't yet been able to find a solution to this without using a preprocess function to check for duplicates or just using the 'tagadelic' module.. it'd be nice to get some closure. How do I ...
6
votes
5answers
4k views

Taxonomy view per vocabulary

I want to create different view pages for different vocabulary types. For each vocabulary I created a view and assigned a filter to limit to one vocabulary; as a page path I'm using taxonomy/term/% (...
6
votes
2answers
6k views

Group nodes by terms

How do you group a list of nodes by the taxonomy term? e.g. Term 1 --- Node 1 --- Node 3 --- Node 7 Term 2 --- Node 6 --- Node 9 --- Node 12 I have tried creating a view with "Node" and "Taxonomy ...
6
votes
1answer
3k views

Retrieve newly created Term tid

I've created a PHP program outside Drupal that inserts Terms into my Drupal installation. define('DRUPAL_DIR', __DIR__); use Drupal\Core\DrupalKernel; use Symfony\Component\HttpFoundation\Request; $...
6
votes
2answers
4k views

Restrict taxonomy terms when users edit content?

I've implemented my site's structure by creating a taxonomy for "areas" and making a term for each area I want in my site (guest info, newbie, facilities, news, and admin). I've let the main menu show ...
6
votes
4answers
5k views

Get the taxonomy term field in Views 3 override title

Is it possible to get a taxonomy term field in the title of a view, using the override title in the contextual filters? I know I can get taxonomy fields using relationships, but is there an argument ...
6
votes
2answers
474 views

Is Drupal 7 a good fit for my site?

I started creating my site in Wordpress 3.1, and I have hit a speed bump. I am considering switching to EE or Drupal 7, in hopes of achieving my vision of the site. The problem I am having is ...
6
votes
1answer
716 views

Auto-remove unused tags

Drupal 7. We want to remove tags (of Tags vocabulary) automatically when all pages referring to this tag are removed. Is there a module for this?
6
votes
5answers
4k views

Entity Reference: Filter by an entity reference view not working as expected

I am attempting to get a taxonomy reference field select widget that shows a list of taxonomy terms, including some extra data from their fields. I have attempted to use the "Reference method" = "...
6
votes
1answer
3k views

How can I show parent and child terms in facet search filter block for a taxonomy field having simple hierarchial select as widget type

I am using facet filter to filter views values . I have a taxonomy term using widget type [Simple Hierarchial Select][1] . I want to be able to filter parent and child terms both in facet filter ...
6
votes
3answers
2k views

List Nodes/Content Type Items with same tags as current

On the node page I'd like to add a linked list of other nodes tagged with the same tag/taxonomy term. How can this be achieved? Via Views? Any help will be highly appreciated
6
votes
4answers
5k views

Limit Taxonomy display in Term Reference based on criteria?

I have Taxonomy called "Region" ex: (Region A / B / C) Each user is linked to Taxonomy "Region" using Profile2 module (one person can be linked to multiple regions) Content Type "Article" has a Term ...
6
votes
1answer
3k views

Using Panels and Views to override taxonomy listing - which argument to use?

I'm using Panels to override the taxonomy display at taxonomy/term. I just enabled the term_view page that comes with Panels and it works great. So going to mysite/colours/blue shows the Panels page ...
6
votes
5answers
5k views

Is there a way to provide a Select All / Check All checkbox for a field that displays multiple checkboxes in Drupal 7?

Seems like there is no core config to setup a "Check All" checkbox unless I missed where it is. I'm creating a content type and have a taxonomy reference field and I have alot of terms, which means ...
6
votes
2answers
3k views

Is there a way to create a taxonomy path redirect?

I am trying to create a taxonomy redirect for specific taxonomy URL. Basically what Taxonomy Redirect did for Drupal 6 but for Drupal 7. I have searched the Drupal 7 API for hook_term_path but don't ...
6
votes
2answers
4k views

Taxonomy bulk edit in Drupal 7

I have been trying to find a good, working method to do some bulk taxonomy operations in Drupal 7. The Administration Views module doesn't appear to work - I just get page not found errors when ...
6
votes
1answer
344 views

Remember users Taxonomy choice, such as which city to filter the site by?

I want to convert an existing site to support the selection and association of Cities. Each node can be associated with a City, and the Cities will be selectable as tabs at the top of each page. Lets ...
6
votes
4answers
2k views

How to show taxonomy terms' description field on a node/add form instead of term title only in drupal 7?

I find it a bit disturbing that you cannot set which fields of taxonomy terms are displayed when you add a new node and have the terms listed. There will be a bunch of terms which the user has to ...
6
votes
2answers
1k views

Translate Taxonomy menu items

I have a vocabulary that I want to shows as menu. For this, I installed the taxonomy menu module and edit the vocabulary to hang from a menu item of Main Menu. The menu is shown perfectly. The ...
6
votes
3answers
10k views

How Can I add a Hierarchical taxonomy Select in views filters and when editing content in Drupal 7

I have created a taxonomy vocabulary called Cars makes and models with a structure similar to this: -Car Make ----Car model -----------Year I want to give the customer, options to ...
6
votes
2answers
874 views

Node alias with taxonomy term

I have the content type 'machine' that uses two vocabularies (producer, category). I would like to create node alias like [language]/machines/[producer-name]/[title-raw]; [producer-name] is from the ...
6
votes
1answer
1k views

How to reference existing term if it exists or create new one if not exist via Inline Entity Form module?

I have a content type book and it has a taxonomy term reference field: author. I want to enter name and surname separately for each author on node add/edit page. Name and surname together will be the ...
6
votes
1answer
540 views

Insert 'select all' choice in a particular level in Taxonomy Term Reference Tree Widget

I'm using D7. And I have a big term reference tree with Term Reference Tree. There are so many terms in the tree that I'd like to put 'select all' choice in it for usability. Is it possible to put '...
6
votes
6answers
3k views

Managing large volume of content in tree hierarchy

Firstly I apologise if this has already been answered. I thought it would be a common problem and I'm surprised that I haven't found a general solution anywhere. I have a large corporate website (...
6
votes
1answer
191 views

How can I list the users who are associated with a given Profile2 profile using Views?

I have a site that has an Organization content type. Each organization has an associated Profile2 profile that contains a reference to a Taxonomy vocabulary depicting the hierarchy of the organization....
5
votes
3answers
4k views

How do I disable the taxonomy term page?

I would like to disable the taxonomy/term/1 page that list the nodes using that taxonomy term. I have found some modules for older Drupal versions, but I haven't found quite what I'm looking for in ...
5
votes
5answers
6k views

How to modify taxonomy term path in the page render array?

I'm trying to change the path of a term before it's displayed on a node page. I'm using this preprocess function in template.php: function bartik_preprocess_node(&$variables) { $variables['...
5
votes
3answers
4k views

How to remove “There is currently no content classified with this term.” phrase?

I have multiple terms created and for each I have created direct links. However under the content this message is displayed (because there are no content linked to the node) : There is currently ...
5
votes
4answers
5k views

How do I use views to override a taxonomy term page for only terms with a single vocabulary?

How do I configure a view to allow me override only term pages within a specific vocabulary without overriding all other term pages? Edit: Due to the requirements of the project, this must be done ...
5
votes
1answer
5k views

Sort by taxonomy term name in Views?

So I feel like I must be missing something obvious, but I can't find a solution to my situation. I'm trying to sort some nodes by the chosen taxonomy term name. This is Drupal 7, Views 3. I have a ...
5
votes
2answers
8k views

How to programatically access the value of a taxonomy term reference?

I have a taxonomy term reference field attached to my user account. I tried getting the value programatically in the same way as I get the value for text fields, but it doesn't work. use Drupal\Core\...
5
votes
3answers
876 views

How to get a term from the translated term name?

I have a translated taxonomy term whose name is Autos Y Motores (Spanish). How can I get the taxonomy term object from it? If the term name were in English, I would use taxonomy_get_term_by_name('...
5
votes
1answer
6k views

Get list of taxonomy terms for current node through Views

I've been trying this for awhile, and I keep finding answers that are close - but not quite. If there is a node with taxonomy terms attached to it, I want to create a block in Views that I can place ...
5
votes
2answers
5k views

How to set parent on taxonomy term

I have done: $term = Term::create([ 'name' => 'title', 'vid' => 'myvocab', ])->save(); It works. But I don't seem to be able to set the parent term. I have tried: $term->parent = ...
5
votes
5answers
7k views

How to show translated taxonomy terms in a view?

I have used the Views module to create a view of taxonomy terms. The taxonomy terms are translated in the Greek language also (apart from English), using the typical i18n modules. But when I switch ...
5
votes
2answers
4k views

Better tagging / taxonomy reference widget

The Term Reference field type has three stock widget types: Select List Check boxes/radio buttons Autocomplete term widget (tagging) We need an alternative to the autocomplete widget that shows all ...
5
votes
3answers
7k views

Can I display all token values available for my Drupal installation?

Is there a way that I can display all possible values for tokens available on my Drupal installation? For example, I'd like to see all of the possible values for the [termalias-raw] placeholder that I ...
5
votes
1answer
4k views

Show newest nodes for each taxonomy term in Views

A block with taxonomy terms and an overview of the newest nodes for each taxonomy term. Every news sites uses this idea. Business: Article 1, Article 2 Technology: Article 1, Article 2 Sports: ...
5
votes
1answer
1k views

How do I hide the link to the RSS feed on the term page?

I want to keep the feed functionality, but I want to hide the "Subscribe to [term name]" link on the term page.
5
votes
4answers
6k views

Create taxonomy terms on the fly

As far as I know, the way to create a taxonomy term is having to go into the taxonomy module and creating on there, and THEN assigning the term to the node. Is there a way to create taxonomy terms on ...
5
votes
1answer
8k views

How to use Taxonomy to tag/categories content?

I installed and enabled the Taxonomy module, created an Event content type, and a "International Competition" node of that type. I want to apply the tags senior, male, and annual to this event. I can'...
5
votes
2answers
921 views

How to prevent deleting a term if used?

Is there any way to prevent deleting a taxonomy term if it used in any node ? I have a Taxonomy that is used in Field Collection in my Content Type , I want to warn/prevent deletion of any Term in ...
5
votes
2answers
5k views

Views taxonomy contextual filter?

I have taxonomy vocabulary called “Groups”, with 3 terms. I have two content types that both use a Groups term reference field. These content types are called “Media” and “Links”. When displaying “...

1 2
3
4 5
71