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

How to make custom Views filter plugin dependent on the values of anotherr filter value?

I have created a custom Views filter plugin that filters the node according to nid. This is available as a dropdown plugin. There is another custom Views filter available as dropdown. The value of the ...
user avatar
  • 804
1 vote
1 answer
14 views

Views SQL query not showing in production

I don't see any of my data from my view on my production website. I'd like to compare the data generated in the view compared to my local (which is working fine). But in my production website, I don't ...
user avatar
  • 51
1 vote
1 answer
13 views

How to show terms with a specific depth as exposed filter

I would like, on Drupal 9, to show in a view as exposed filter a taxonomy term with depth 0, one with level one (the children) and one with level 2 (level one's children). Basically I have a content ...
user avatar
  • 93
0 votes
1 answer
40 views

Proactively rebuild view cache

I have a view that takes a while to build when the cache is cold (around 11s). When the cache is hot, the view loads quickly, of course (around 100ms). I'm using tag-based caching for this view, so ...
user avatar
0 votes
1 answer
21 views

How do I override the template file of a view so that it no longer displays links in my view, but only the plain text?

How do I override the template file of a view so that it no longer displays links in my view, but only the plain text? This is a body field where the titles of the refenced entities are displayed as ...
user avatar
1 vote
0 answers
6 views

How do I make an exposed drop-down filter filter on a grouped set of date fields?

We have a Drupal 9 View of nodes that have a date field. The node dates will all be for a particular day for one specific week (for an event). We have the View formatted set to group the dates and ...
user avatar
-2 votes
0 answers
13 views

How to make a "Print Friendly" function for Views pages?

We are using the Print module printfriendly module but it only works on entities. We have a View that we would like to put a "Print Friendly" option on to print out the view in a printer ...
user avatar
0 votes
0 answers
48 views

Fit locations does not work with GPX files

I installed the "Geolocation Field" module on Drupal 9. I created a "track" content type with a "Geolocation GPX File" field. I created a node with a GPX file loaded. ...
user avatar
  • 1
0 votes
0 answers
6 views

Group rows by date

In a custom view, I have some values which belong to the same month (06/2022). If I have some other data, they will be also displayed (before or after the 06/2022) How can I change the configuration ...
user avatar
  • 51
0 votes
1 answer
29 views

How to render a custom block with variables from another custom block twig template

I have a custom block with some values I can access in the template of that block, for example the product_type variable. In the same template file I'm adding another view block with {{ drupal_block('...
user avatar
1 vote
0 answers
28 views

When I add a particular field, the preview disappears. Why?

I have a Drupal 9 view which shows the fields of a particular content type. This content type has a particular field, ver. When I add this field in the view, the preview disappears and I get this ...
user avatar
-1 votes
0 answers
13 views

How to extend views_handler_filter_string for a custom Views field?

I have declared this custom field in hook_views_data(): // The status field $data['invite']['invite_status'] = array( 'title' => t('Invite status'), 'help' => t('Provide a status ...
user avatar
-2 votes
0 answers
27 views

Can we inherit different content type into on content type, content -> Add content [closed]

I have created a dropdown which shows list of content type (landing page). I want to fetch all fields for the particular LP type? Reference to screenshot : LP type show list of content type(landing ...
user avatar
  • 1
-1 votes
0 answers
17 views

How can I hide/show exposed filters according to permissions? [closed]

I have three exposed filters: Colors, Shape, and Size. I want to show all the exposed filter to anonymous users, but hide Shape and Size to authenticated users.
user avatar
0 votes
0 answers
10 views

Grouped Date Filter - Offsetting by time of day

So I have a date field in an Order content type, and a view including an exposed grouped filter for a Date with buttons for early morning, mid-morning, noon, etc. I need to modify this filter so that ...
user avatar
0 votes
0 answers
27 views

How do I create a block that displays nodes related to the current page?

I have a taxonomy vocabulary (Tags) with the following terms. term 1 term 2 term 3 term 4 term 5 term 6 term 7 term 8 term 9 term 10 term 11 term 12 term 13 term 14 term 15 term 16 I have an ...
user avatar
  • 11
0 votes
0 answers
19 views

Views: querying several fields and presenting aggregate values

I have a need to build a report that aggregates field values using sum and count. I am running into trouble though figuring out how to solve rows that don't map at a field. For one, the table headers (...
user avatar
  • 26.5k
0 votes
0 answers
12 views

How to get the multiple fields values update in one field on view page

i am creating one preprocess_views_view_field for specifc one field.I have 2 fields file name and news link. while need to change or get the those values are pass to field_link_text. I cant achive it ...
user avatar
0 votes
0 answers
44 views

How to display nodes that belong to the same taxonomy term as the current page?

I created a "Categories" taxonomy vocabulary with the following terms and child terms : - Crypto -- Binance -- Ledger -- Metamask - Geek -- Security -- Apple ... The "tags" ...
user avatar
  • 33
0 votes
0 answers
22 views

Programatically added custom fields don't show up

I'm adding new fields to views through a custom module. When I open the view page UI, the field is not shown. However, If I edit the view from the user interface, and click on Add field, the custom ...
user avatar
  • 321
0 votes
1 answer
17 views

Add custom actions

In our website, I created a webform to allow users to ask for permission to purchase items; then, I created a view to show a table of records with the values in the fields contained in the webform ...
user avatar
1 vote
1 answer
27 views

Persist query string arguments across all links in a particular menu?

I have a menu "Display Style Switcher" which has two links: Map, and List. You click Map, you get the Map display of search results, and if you click List you get the list display of search ...
user avatar
-1 votes
0 answers
49 views

How do I display two location fields on a map?

I installed the Geolocation Field module; I added a Geolocation field in Media and one in a content type. I created a block with a map. The problem is that I can select only one Geolocation field. How ...
user avatar
-1 votes
0 answers
34 views

How do I center the map on the GPX track with Geolocation Field?

I created a Track content type with a Geolocation GPX File field. I imported a GPX file. When I visualize the node, the map displays the ocean. The settings in Manage the display don't allow to center ...
user avatar
-2 votes
0 answers
15 views

Drupal 9 "Add to cart" theming hide color attribute from custom display view

I need little assists, I am following Commerce 2 "Add to cart theming" Link And I cannot hide my custom display view the "color" attribute, what's wrong with it? {# /** * @file * ...
user avatar
  • 1
0 votes
1 answer
22 views

CSS in custom module not loading

I'm trying to load a css file in a custom module, to style a template file I'm rendering. I followed the basic steps: global-styling: version: 1.0 css: layout: css/rr_users.css: {} ...
user avatar
0 votes
1 answer
22 views

How to display in a block the media used in a node?

On my Drupal 9 installation, I created nodes with Media images integrated with CKEditor. This is not an image field in the node type, but an image embedded in node content with Media and CKEditor. How ...
user avatar
0 votes
0 answers
23 views

Filter criteria field Timestamp value <= now

is it possible to filter a timestamp field against 'now' or 'today' value. it works very well with any Date field but i can't make it with a timestamp. the timestamp filter works if i put avalue of ...
user avatar
0 votes
1 answer
45 views

Change weight/order of exposed filters

I have a view with two exposed filters: one generated using the Views UI, and another filter from custom code. Can I change the order in which the exposed filters are rendered on the form? I could not ...
user avatar
  • 11
0 votes
0 answers
6 views

Paginate unformatted view

I would like to just render the {{pager}} variable inside a views-view-unformmatted twig template, but the variable seems to be only available for formatted views. Which is the easiest way to do the ...
user avatar
  • 11
0 votes
1 answer
47 views

How do I use hook_preprocess_views_view_unformatted()?

I'm trying to use hook_preprocess_views_view_unformatted() on a Drupal 9 website. I tried to put very simple command into the function in mytheme.theme and in a custom module; unfortunately it didn't ...
user avatar
0 votes
0 answers
7 views

Hide only one field from view for empty contextual filter

I have a view with the following structure: Here's the response in close-up: My requirement is to hide thecontent field for an empty contextual filter value i.e when we call /sync/newslist. The ...
user avatar
0 votes
0 answers
15 views

How to group some exposed filters in a collapsible block

I have a view with several exposed filters The theme is based on bootstrap, so I'm looking for a way to group some of them within a collapsible or accordion block (Bootstrap example) I'd like to avoid ...
user avatar
0 votes
0 answers
40 views

Custom Views Field Plugin

I am creating a custom views field plugin, and I am having a huge amount of notices in the dblog that I cannot trace. It's a simple views field plugin that just renders some content into a custom &...
user avatar
  • 161
0 votes
0 answers
21 views

Filter date/time from date-range picker

I have a content type with a Date-range field; the default output in the view gives me, for example, Saturday, June 4, 2022 - 16:30 - Saturday, June 4, 2022 - 19:00. What I would like to show is ...
user avatar
  • 199
0 votes
0 answers
95 views

How do i list all child terms that share the same parent term? But on "child term" page?

Let's say I have the following taxonomy (a 3-level hierarchy). Acura Integra Hatchback 1991 Hatchback 1995 Hatchback 2000 If I am on the last term of this hierarchy, for example Hatchback 1991, ...
user avatar
  • 169
1 vote
1 answer
64 views

Use path alias as contextual filter

I have nodes in Drupal for News Articles that generates this automatic URL alias. I also have a view for News nodes. This is the data. The problem is that I can't use Content: Path (url) or Content:...
user avatar
0 votes
1 answer
28 views

Render a fulltext exposed search bar separate from the rest of the filters

I would like to render my exposed fulltext search bar in a separate location from the rest of my search filters. My other exposed search filters are things like display number, sort order, etc... I am ...
user avatar
  • 323
0 votes
0 answers
21 views

display paragraph field in a view

I am trying to display my paragraph bundle fields in a view. is that possible? I have a bundle that contains 2 fields with no input limit. I want to display one of the fields in a view. I added a ...
user avatar
0 votes
1 answer
20 views

Programmatically create result row in views

I have created a bunch of content types. Since I am using Drupal only for displaying results fetched from another service I was wondering if there is a way to display results in a view without ...
user avatar
0 votes
0 answers
52 views

How to get PHP code into a Views Filter

I have a text field which is extracted from photo's EXIF value; its value is similar to 2021-05-31T15:15:05. I want to create a view, use the filter and get the field added in. However, I can't use ...
user avatar
0 votes
2 answers
19 views

How do I print an exposed filter block in a template file?

I have a view with an exposed taxonomy filter. I configured it to be displayed as a separate block so that I can print it another twig template. I tried this. /** * Implements hook_preprocess_block() ...
user avatar
  • 804
0 votes
0 answers
24 views

How to remove a sort in hook_views_query_alter

I've got a search API search view that has two sorts on it. relevance and then published date. This means that when I do a text search the relevancy score handles the sorting, but when there is no ...
user avatar
  • 1,269
0 votes
0 answers
19 views

How do I get coupons usage in a view

There is no field for the number of times the coupon was used in Add fields when creating a new view. while other related fields such as Usage limit are available, according to database check: The ...
user avatar
-1 votes
0 answers
41 views

Show title of a referenced node

I have a node type of "Countries" and node type of "Continent". On the "Continent" node type, I created a referenced field of countries (field_countries). On my Countries ...
user avatar
  • 1
0 votes
0 answers
19 views

Filter or sort Multivalue Field of referenced Media items to their boolean field

I have a list of users who can add audios to their profiles via an multi-value entity reference field. The media/audio has an additional Boolean field to check if it's a primary or normal audio. In a ...
user avatar
0 votes
0 answers
9 views

Views exposed filter on multiple references

I have a site built with domain_access and quiz modules. I have a content type Page and quizzes. Both the Page and Quiz share two taxonomies (theme and category), and ofcourse domain reference. I have ...
user avatar
0 votes
0 answers
11 views

Results from "end date" in date range excluded from Views results [duplicate]

I have a view of Commerce orders, and I need to add an exposed filter to filter the orders by date range. I have added two exposed filters for Order: Placed. One filter is "greater than or equal ...
user avatar
  • 1,234
0 votes
0 answers
25 views

Unformatted Views mutliple taxonomy terms

I apologize if it's an obvious question and I'm fairly new to twig and drupal. I'm trying to get the all the taxonomy term selected on the field field_delivered_on_behalf_of in views-unformatted twig ...
user avatar
0 votes
1 answer
75 views

Run into issues with Drush after updating from 8.9.20 to 9.3.13

I upgraded from 8.9.20 to 9.3.13 and i did an update.php after this. I do get an error: MISSING UPDATES FOR: VIEWS The installed version of the Views module is too old to update. Update to a version ...
user avatar

1
2 3 4 5
301