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
46 views

How can I show child categories in the parent category page?

I have created a new vocabulary with some extra fields and these taxonomy terms. Parent 1 Child 1.1 Child 1.2 Child 1.3 Parent 2 Child 2.1 Child 2.2 Child 2.3 Parent 3 Parent 4 Parent 5 In the ...
Abhilesh Sharma's user avatar
1 vote
2 answers
354 views

How to pass paragraph id from layout builder to view?

I have asked this question before but in a different, more convoluted context. This is a simpler example. I have a paragraph type which I use Layout Builder to define it's layout. In that layout I ...
liquidcms's user avatar
  • 1,224
1 vote
0 answers
46 views

List all groups of a user in one row as a multi-field

I want to list all the users and groups they are member of in one table, one row per user. I have a simple view that lists all users in the system. I added relation to group content membership and a &...
carlo's user avatar
  • 21
1 vote
1 answer
107 views

How to render the correct variation price in catalogs?

I have a product catalog built using search api, facets, and views like this: https://docs.drupalcommerce.org/commerce2/developer-guide/products/marketing-products/product-catalog-facets. My add to ...
Kristoffer Rom's user avatar
0 votes
1 answer
45 views

How can I make the relation I am using in a view work again?

I'm currently migrating from Drupal 7 to Drupal 9, and i'm rebuilding all views (as I can't find a good migration procedure for views from 7 to 9), also trying to understand the changes (this is a ...
Francisco Ramos's user avatar
1 vote
1 answer
148 views

How to hide the tabs on the user account if it is not his account? [duplicate]

My users have permission to view other users' accounts. Only the "View" tab page. This is exactly what I want. On the user account, by default, there are three tabs: View Shortcuts Edit ...
eric55's user avatar
  • 1
0 votes
1 answer
27 views

How to differentiate the state when a contextual filter is applied?

Hello to all the Drupal community. I've recently faced a challenge to visually modify some parts of my view's template for the state when its contextual filter is applied. Some details are as follows: ...
Themetis's user avatar
0 votes
1 answer
61 views

Sort views by number of related tags

I want to create a view block with related content based on shared terms. For this I created a term reference field inside the content type and created a views where I use a contextual filter Taxonomy ...
Joost's user avatar
  • 1,218
0 votes
1 answer
182 views

simple view of a custom entity is extremely slow

I have created a custom entity to store payment information: * @ContentEntityType( * id = "bank_operation", * label = @Translation("Bank operation"), * handlers = { ... ...
Baud's user avatar
  • 570
2 votes
1 answer
107 views

How can I sort results by contextual filter value?

I have a set of pages that use path information to - amongst other things - create view of relevent news articles. eg: mysite.com/city-service mysite.com/country-service etc I have an existing view ...
tanbog's user avatar
  • 1,243
1 vote
0 answers
93 views

How do I filter the result of "Custom Text Field"?

I have added a Custom Text field in a view that displays yes / No. How can I filter the data using exposed filters where custom text field value is only yes / No. I found that the Custom text field is ...
Manjunath Sharma Konakanchi's user avatar
0 votes
0 answers
82 views

Search API Solr sorting with Entityqueue

i have a Drupal search api view with solr. I want to use entity queue for sorting the view and setting a specific order of nodes. However this does not work at all. I have added the relation with ...
Thomas Crawford's user avatar
0 votes
0 answers
101 views

Bulk update product variations weight

I've created a module for a custom VBO action. The action can be selected in the view, and the function is executed, but $request is empty and the selected product variation IDs are not available. ...
user3086053's user avatar
0 votes
1 answer
61 views

Token [current-page:url] is missing the language prefix in multi-language site setup

Using Drupal v9.4 and Token v1.10.0, the [current-page:url] doesn't seem to include the language prefix. The setup is I have two languages: English and Spanish. I created a View where the path is /...
Leolando Tan's user avatar
  • 1,482
0 votes
1 answer
223 views

How do I restrict content access programmatically?

Something is baffling me. I have this view of streams to users. An admin may make a stream to themselves, a specific person or everyone. I also have this code in which a non-admin user may see only ...
Kartagis's user avatar
  • 612
0 votes
1 answer
69 views

Impossible to use custom fields in twig linked to form

I have a form in which I have two date fields and a filter button. This form is included in a custom view in which I have a table that displays data from the database. The date fields are here to ...
Pedro's user avatar
  • 51
0 votes
0 answers
32 views

How to display random banners if the number I need exceeds the amount of vocabulary terms?

I made a classified ads site in Drupal 6, now I am updating it to Drupal 9. I already have the "ads" part working, defining categories with a taxonomy vocabulary but displaying the ads with ...
Claudia Burman's user avatar
-3 votes
1 answer
166 views

How to display a block on the home page when the user is authenticated or anonymous?

I created two custom blocks. I want to display its two blocks only when the home page view is empty. I want the custom block with id 11 to be displayed for anonymous users. I want the custom block ...
francky's user avatar
-3 votes
1 answer
39 views

How to replace the default text of the home page, when it is empty? [closed]

On the Drupal 9 home page, there is a text displayed by default, when no content has been created. I want to modify the text of this page, when there is no result. I go to the "frontpage" ...
francky's user avatar
0 votes
2 answers
516 views

Get parent Paragraph Entity from Referenced View

I have a custom paragraph type - which has 2 fields: Display Mode, View to be rendered I want to let users choose Display Mode in this paragraph, then I will render view dynamically based on this ...
Austin L's user avatar
0 votes
1 answer
93 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, ...
S.Green's user avatar
1 vote
0 answers
31 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 ...
Joseph's user avatar
  • 1,596
0 votes
1 answer
113 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 ...
Baud's user avatar
  • 570
0 votes
1 answer
65 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 ...
Simba's user avatar
  • 3
0 votes
1 answer
647 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 ...
Alex Smirnoff's user avatar
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, ...
Kartagis's user avatar
  • 612
1 vote
0 answers
128 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 ...
Mohit Wadhwa's user avatar
-1 votes
1 answer
122 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 ...
user108836's user avatar
0 votes
0 answers
31 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 ...
Stuart Layland's user avatar
0 votes
1 answer
288 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?
Bryan Green's user avatar
0 votes
0 answers
58 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 ...
hip's user avatar
  • 17
0 votes
0 answers
126 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) ...
bimsalrobit's user avatar
1 vote
0 answers
151 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 ...
bigmike7801's user avatar
1 vote
1 answer
33 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 ...
River Zhao's user avatar
-1 votes
2 answers
183 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 ...
crzpiot's user avatar
  • 434
0 votes
1 answer
201 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 ...
bimsalrobit's user avatar
1 vote
1 answer
227 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?
Patoshi パトシ's user avatar
0 votes
1 answer
204 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 (...
Tabestan's user avatar
0 votes
1 answer
132 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 ...
Mitchell's user avatar
0 votes
1 answer
111 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 ...
john Smith's user avatar
1 vote
1 answer
65 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 ...
Patrick Man's user avatar
0 votes
2 answers
471 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 ...
Hunter Woodstock's user avatar
0 votes
1 answer
32 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 ...
ABHISHEK Joshi's user avatar
0 votes
0 answers
63 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 /...
unixmiah's user avatar
  • 105
0 votes
0 answers
59 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 ...
deelite's user avatar
  • 479
-2 votes
1 answer
485 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 ...
arek_s's user avatar
  • 9
0 votes
1 answer
38 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 ...
Suraj's user avatar
  • 884
0 votes
0 answers
24 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 ...
DStrider's user avatar
  • 135
0 votes
0 answers
36 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 "...
Ionut Cornea's user avatar
1 vote
1 answer
407 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 ...
Vik Durve's user avatar

1
3 4
5
6 7
304