Questions tagged [views]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 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
31 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, ...
  • 547
0 votes
0 answers
14 views

How to display a block view based on certain items in a field?

I have a member content type for my site which has a field of field_member_position which has 3 options available to it: Member Mentor Both I've created a block view which I want to be displayed in ...
1 vote
0 answers
18 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
21 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
20 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
17 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
20 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
14 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
25 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?
-1 votes
0 answers
31 views

Why do VERF filters reload the View page when a certain value is selected?

I have a View, Use Ajax is checked in the settings. It has 5 exposed filters. VERF filters that are provided using the Views Entity Reference Filter module reload the View page when selecting some ...
0 votes
0 answers
37 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
11 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
40 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
31 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
20 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 ...
-1 votes
0 answers
22 views

View with reference to content type

I want to create a filter view for a content type "congressmen", each congressman has a political party field as a reference to another content type called "political party", when ...
  • 1
0 votes
0 answers
20 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: ...
-2 votes
0 answers
24 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 ...
  • 415
0 votes
1 answer
42 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
20 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
16 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
12 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
22 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 (...
-2 votes
0 answers
30 views

Duplicate products in a view

after I switched from fields to products in the show section of the view, I get several duplicates of the same SKU. I used jquery distinct and product delta variation filter set to 0 to delete any ...
0 votes
0 answers
16 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
47 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
10 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 ...
  • 73
-4 votes
0 answers
33 views

How can I limit the search level in on taxonomy?

​ I created taxonomy terms and subterms. My nodes can be associated with only one term. Here is my taxonomy: I created a view block that displays sticky nodes. I added to my view the contextual ...
-2 votes
0 answers
14 views

There is no filtering for states in the view

I am using Webform Workflows Element module i created a process and i need to filter these states but they are not in filter criteria I connected the necessary module for integration with views and ...
0 votes
1 answer
51 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
41 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
1 answer
25 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
13 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
45 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
8 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
18 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 ...
  • 469
-2 votes
1 answer
49 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
23 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 ...
  • 854
0 votes
0 answers
10 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 ...
  • 115
0 votes
0 answers
23 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
41 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
22 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.
  • 26.9k
0 votes
1 answer
31 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
19 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
8 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 ...
  • 323
0 votes
0 answers
32 views

Help to avoid using PHP filter in an entity reference view

My site is about chemistry labs which uses many studios like a blood test. Some studio fields are Gender (male, female, both) and Age (2 fields, min and max values, could be days, months, years). ...
  • 1,588
0 votes
0 answers
8 views

View children items of parent and sub taxonomy terms on the same page

I am working on a view with taxonomy terms. The taxonomy list has multiple levels of taxonomy terms, so for example: Level 1 (parent) Level 2 Level 3 Level 4 I am using views_tree to create this. ...
  • 25

1
2 3 4 5
302