We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [taxonomy-terms]

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

Filter by
Sorted by
Tagged with
6
votes
5answers
2k views

How do I limit the allowed taxonomy terms basing on the content type?

I have two different content types, Computer and Chemistry, and taxonomy terms for all articles (content types) which store the methodology of the article. The taxonomy hierarchy is the following. ...
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
3answers
7k 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
1answer
2k 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
701 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
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
2answers
3k views

8 - How to programmatically add terms to an existing Node

After loading a node with Node::load with an existing taxonomy field abc do I add a new term and save? Something like? $term = Term::load(123); $node->get('abc')->appendItem($term );
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
2k 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
3answers
3k views

how to create view that display just 2 level of taxonomy vocabulary

i have a vocabulary that contain plus of 5 level descendant, i need to create the view to display the first 2 levels and grouping by the first one, i do this: FIELDS: (Parent) Taxonomy term: Name - ...
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
343 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 create a vocabulary and populate it with terms using features

I'd like to create a feature that creates a vocabulary and populates it with taxonomy terms. Creating a vocabulary is easy with features and it can be done using UI (I only need to select the desired ...
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
872 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
892 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
3k views

Override the taxonomy pages

In Drupal 7, you can use taxonomy-term.tpl.php to override taxonomy pages. Inside the taxonomy-term.tpl.php page, you can use <?php print $term->field_NAME['und'][0]['value'];?>to print out ...
6
votes
1answer
527 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
189 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
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
4k 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
1answer
6k views

How can I make the taxonomy terms appear in a drop down list?

How to make the taxonomy term in drop down list? Vocabul Drupal 6 taxonomy term in drop down list while creating new article. Drupal 8 taxonomy term can't show drop down list while creating new ...
5
votes
3answers
764 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
5answers
6k 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
5k 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
4answers
5k 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 content. Is there a way to create taxonomy terms ...
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
3answers
764 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 “...
5
votes
1answer
3k views

Programmatically add more than one taxonomy term in Drupal 7

Just a quick question. I'm creating a node and adding a term to the node like this: $newNode->field_tags[$newNode->language][]['tid'] = "a digit here"; Fine, but how do I add more than one ...
5
votes
1answer
6k views

Get vocabulary name from vid function

I am trying to extract the vocabulary's name from it's vid. Is there a function that does that or do I have to create it?
5
votes
1answer
10k views

Taxonomy in Contextual filters for Views

I am new to drupal and currently I am exploring the Views module. I have a dummy website for a toy shop to learn on. I have created taxonomy as follows where "Category," "Ages," and "Brand" are ...
5
votes
2answers
10k views

How can I get the parent term in a taxonomy with a hierarchy?

I have a node that is tagged with a taxonomy term which is part of a hierarchy of terms such as "state >> county." As the user has selected one of the "county" tags, how can I get the name of the ...
5
votes
4answers
3k 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" = "...
5
votes
4answers
220 views

How to sync a taxonomy between Drupal and a 3rd-party system?

I have a custom made system (non Drupal) that has a taxonomy like: Element 1 Element 1.1 Element 1.2 Element 1.3 Element 2 Element 2.1 Element 2.2 Element 3 ... And I have a Drupal ...
5
votes
3answers
3k views

How to retrieve all nodes for a taxonomy term using Services?

I want to retrieve all the nodes associated with a given taxonomy term (field_term) using HTTP GET. I have tried: curl -v http://myserver/endpoint_path/node?parameters[field_term]=1 but I get an ...