Questions tagged [views]

The Views module allows creating lists of entities with a flexible query builder.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

change taxonomies link [duplicate]

I have a problem and I want to modify the link of a taxonomy but I don't know how. For example, I want that when I click on the taxonomy "news" it takes me to the url "magazine/...
0 votes
1 answer
48 views

Submissions of different webforms in one page without extra access

I searched a lot and did not find any good advice, so I ask support form community. please help ! . Suppose this scenario and suggest me what should I do ?! . I have three webform > Webform A, ...
0 votes
0 answers
21 views

List of users allowed to view nodes

I am using the Content Access and ACL modules to grant view access to a custom content type to users who didn't create those nodes. Both modules work perfectly. I created a view showing those nodes ...
  • 11
1 vote
0 answers
26 views

List down only entities which share the same field value as another

I'd like to have a View of entities (e.g. nodes) that only "show duplicates", i.e. show entities that have a specific field having a value that's also used by two or more entities. To put it ...
  • 1,382
0 votes
0 answers
15 views

Only show other members with the same taxonomy term selected

On my site I have a "member" content type which has a field of field_member_pos that's a taxonomy reference field that allows you to select 1 or both options. This taxonomy term only has 2 ...
0 votes
1 answer
79 views

Remove duplicated email in views data export

My site contains users with duplicated emails which is fine for my use case. I need to export the user's fields into an xlsx but, this time, without duplicated email. For this I have created a Users ...
  • 438
0 votes
0 answers
13 views

How to apply Views bulk operations on nodes related with layout builder settings?

I have a number of nodes of a particular content type with Layout Builder enabled. Layout Builder has an option to revert to the default for each node of a content type. How can we expose this ...
  • 858
0 votes
1 answer
38 views

How do I make the default content View filterable by multiple content types?

Below is a clip from the content list admin page in Drupal 9, showing the Content type field drop-list, allowing admin users to filter the content list by content type. Is there any way to alter this ...
  • 3
0 votes
1 answer
183 views

JSON:API fundamental permissions and access restriction question

Intro JSON:API is declared as a must-have for decoupled Drupal websites. While I completely (well, I hope so) understand the built-in Drupal permissions/access restriction system, I have a specific ...
0 votes
0 answers
34 views

What could cause these fields to be reverted to unsortable?

I've been working on this view for some time. I've 5 page and 5 block displays and have a table in each. I click the table settings, sort every field that needs to be sorted, then save the view, ...
  • 568
1 vote
0 answers
74 views

Facets not working with Algolia search

I am implementing Algolia search and using the following contributed modules Search API Algolia Facets After configuring the modules, the content/data indexing is working fine and is reflecting on ...
-1 votes
1 answer
48 views

How to create a view of the most popular nodes?

How to create a view of the most popular nodes? I went through the filter criteria looking for something such as "most read" or "most visited" or "most popular" but I ...
0 votes
0 answers
81 views

How do I remove the view container from Drupal 9 custom theme for a particular view

I am new to Drupal theme development and would like to know how to remove the view container divs that hold views-element-container, view and view-content. I tried to change the template file ...
0 votes
0 answers
26 views

How do I include a list of nodes in Webform, with multiple fields per node / views row?

In a Drupal 7 project, I had used the webform_view (https://www.drupal.org/project/webform_view) module to list a number of nodes in a webform with a "quantity" and "size" field ...
0 votes
0 answers
99 views

Why is the view page reloading when clicking on the exposed filter value after adding such jquery code?

I had a problem, with two view filters (VERF selector) from the Views Entity Reference Filter module, when selecting any value, reload the page while Use AJAX is enabled. It turned out that the reason ...
0 votes
0 answers
28 views

Adding custom field and pdf print option to Webform Submission information

I have a requirement to add a select list containing yes/no to a webform submission view form and make it available in Drupal views, is there a way to add a field with a dropdown and with print option ...
0 votes
1 answer
88 views

How can I compare two fields in a filter?

Since Drupal 9 no longer has the Globals: Fields Comparison option (as Drupal 7 did) in the view's filter section, how can I compare two fields?
0 votes
0 answers
53 views

Conditional filter for visitor role

I'm throwing a big number of views showing a list of 'events' (nodes) happening today, tomorrow and after tomorrow. I'd like registered users with role 'editor' could see all events from today (not ...
  • 17
0 votes
0 answers
17 views

Getting full name, phone number out of address field

I am using Drupal 7 with Address module and fields, when i am trying to create a view from that field i am getting full data from Commerce Customer profile: Address field, is there any possibility to ...
0 votes
0 answers
58 views

Why does the view page reload when the button is clicked even after the RefreshView has been added?

Problem: The View page is reloaded when clicking on the buttons even after adding RefreshView: (function($, Drupal) { Drupal.behaviors.switchContentViewMode = { attach: function attach(context) ...
1 vote
0 answers
72 views

How can I access the file-link.html.twig template?

I'm trying to access the functionality of the file-link.html.twig template that comes with the classy theme so that I can have the file-type icons automatically appear next to the file links. I've ...
1 vote
1 answer
22 views

How to control pagination and data merge display when using view attachments

Now I have a requirement to display the activity data in the activity list: Judging by the current time, the activities that are about to start are sorted in ascending order; the activities that are ...
0 votes
0 answers
37 views

Unable to get Webform Submission data

I'm working on displaying specific webform node submissions in a view, while trying to create a view for the webform submissions to access specific data, the views field "webform submission data: ...
-1 votes
2 answers
89 views

Creating a category page when using the Search API module

I’m trying to build a Drupal Commerce store which is going to be my first timer with Drupal 8+. However, the approach described in the Drupal Commerce documentation regarding the creation of a ...
  • 424
0 votes
1 answer
96 views

How to identify ajax request in the exposed form of the View?

I have a View, it is ajax View. There are exposed filters (with checkboxes). When I select a checkbox \Drupal::routeMatch()->getRouteName() shows general route name: views.ajax I need to change ...
0 votes
0 answers
79 views

How to change the value of the form field after clicking the button?

I added the List and Grid buttons to the views-view--list_of_products.html.twig twig template of the View: ..... <div class="product-list-wrapper"> <div class="exposed-...
  • 21
0 votes
0 answers
19 views

Node token into a Views block?

D7. I've a content type with the field "commune" [field_commune]. To the nodes from that content type I've brought in a Views block with a product listing. In views I've created a Global ...
0 votes
1 answer
52 views

In a View, how I display only the first image from a field that allows multiple?

I have a very basic view, that outputs the title and images. Some nodes have 2-3 images in them, but when I create a view it outputs all the images. How do I display only the first image?
0 votes
1 answer
99 views

Contextual filter from Taxonomy inside a paragraph

I have content-type (Destination) with a paragraph added as a component. This paragraph has a referenced taxonomy vocabulary (location). I want to display a list of nodes from another content-type (...
0 votes
0 answers
40 views

View displaying content revision with a relation to a user field

I have a following use case for building a view in D9 that is causing me problems. Each user has a custom field that refers a taxonomy. Let's say it's a list of departments users belong to. Each user ...
  • 115
0 votes
1 answer
62 views

How can I extend an existing View display style?

I'm using the views_summarize module, which adds a custom View display style. The display style is basically a Table view but it allows you to display a summary of a column in a row at the bottom of ...
0 votes
0 answers
9 views

Views Expose Filter List of URLs

I'm trying to display the list of urls in my view to show all of the urls listed. I have that part working in the view, i used the following code for the replacement patterns. <a href="{{ ...
0 votes
0 answers
29 views

Slideshow with Colorbox

In Drupal9 , I need to create a Slideshow along with Colorbox. Requirement: Display the slider/slideshow[one image at a time] in a block and on click of any slider image, it should be displayed in ...
  • 93
0 votes
1 answer
81 views

Custom display_extender not able to use custom ajax callbacks inside options form

i´m working on a custom display extender for Views. The display extender itself works as expected, i´ve taken the code mostly from Studiogd The display extender plugin now i needed in the options form ...
1 vote
1 answer
48 views

How to set up news page view so that news/topic shows news pieces with topic (which is an entity reference field)?

I have a news page set up as a page display, showing nodes of a specific Content Type. /news works as expected. I now want to improve the view: When someone goes to /news/pancreas or /news/heart, for ...
0 votes
2 answers
185 views

How do I include a taxonomy term in exposed combine fields filter?

I am building a view with an exposed combine fields filter that needs to include a taxonomy vocabulary. I have completed the below steps but the filter does not return any results when a taxonomy term ...
0 votes
1 answer
16 views

Distinct selection of a field in views

I created a view in the views module which displays the blogs posted on my site having ONE tag. (Each blog has only 1 tag) Is it possible to do a 'distinct' argument to only display every tag in this ...
0 votes
0 answers
53 views

How to delete a node without deleting it's relation

I have the following script that I run in /devel/php panel to delete the list of nodes in the array. I want to delete the nodes but I do not want to delete it's relation. When I run this script from /...
  • 107
0 votes
0 answers
17 views

Ajax issue in tab when embedding a view

trying to add two views in panel in drupal 7 in one views it is working fine ajax like comment on ajax and all works good , but while switching on different tab ajax is not working fine. in recently-...
0 votes
0 answers
14 views

How would I show the total members for an Organic Group in a view?

This question has been asked, but the answers are all for Drupal 7. Organic Groups for Drupal 8/9 has changed the relationship options. Previous answers do not apply. I would like a view to display ...
0 votes
0 answers
31 views

Fields only from the first paragraph

I have a node type with paragraphs. In a view I need to get fields from these paragraphs. But only from the first paragraph of every node. In the view I have a relationship to the field which ...
  • 465
-2 votes
1 answer
191 views

How iterate through output from "views-view-field.html.twig" file? [closed]

I have views with 6 results. However they are displayed in 2 different ways. 2 first in one way, 2 next in second way, next in first way and last in second way. I know it is quite confusing. I have ...
  • 9
0 votes
1 answer
26 views

How do I update the sort field value dynamicaly?

I have a requirement to list events via view, but these events are categorized as past, ongoing and upcoming events. View results should show ongoing first, then upcoming and past events in the same ...
  • 874
0 votes
0 answers
20 views

Views Aggregator Plus enumeration, How can I access resulting data to create link to google maps

I have geolatlon field for 10 locations. The view enumerates the geolatlon lat/long and shows it correctly in the footer.(10 lat/long pairs separated by / ) Trying to now access the data as a string ...
  • 135
0 votes
0 answers
28 views

same view, same url path, identical content, but different categories

Not sure if this is a bug or not, but it's giving me a headache already. When I add new content on my D7 website, an article in this case I'm facing a strange behavior. Each article has its own "...
1 vote
1 answer
167 views

How do I translate a custom string in "Global: Custom text"?

In D9 website I have a view with Global: Custom text field. In that field I have placed a string like this: <span class="general-info">{{ 'General Info:'|t }}</span> I want to ...
0 votes
0 answers
24 views

Expose created/changed fields with a HTML datepicker in a view?

Is there a way to expose created/changed fields as a datepicker in a View? I checked around at modules but didn't see any that worked. The default filtering of these two fields is not really usable.
  • 27.2k
0 votes
1 answer
54 views

Use translations with nl2br in template

Is it possible to use translations with nl2br? I tried {{ "This offer may \n interest you"|nl2br|t }}, but it doesn't translate the string because it contains a '\n' character. I already ...
0 votes
0 answers
51 views

Using paragraph preprocess function to change view via drop down value

Using Drupal 9 and very new to this CMS. I have a paragraph which has a drop down (field_bio_display) selection with two view names and an entity reference (field_bio) with an unlimited set of values. ...
  • 1
0 votes
0 answers
19 views

Define a custom taxonomy view for only a specific view bundle

I would like to define a unique view for a specific taxonomy type that will show anytime a user visits the cannocial URL of a specific term. The default URL for this is taxonomy/term/[term-id] as ...