Questions tagged [views]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
37 views

Decoupled site as a presentation (display) layer for external microservices?

I understand that Drupal 9 out of box is very capable as a decoupled aka headless Drupal serves as a back-end for other apps (the core REST, JSONAPI capability). However, I am thinking about the ...
1
vote
0answers
13 views

Create a user map with a results tables below it

I've been searching around for the past couple months, watched a lot of YouTube videos, and read a lot of tutorials, and I've made a lot of progress with an alumni directory our team is creating. But, ...
1
vote
0answers
18 views

Getting different Public path for admin and anonymous users

My site was built using Lightning Drupal distribution. I had my public path as /sites/default/files. I did change the configuration path to /sites/<my_domain>/files in the middle of the project. ...
-1
votes
1answer
20 views

Views showing quizzes and content sharing taxonomy term

I have a Drupal 9 site, with a lot of quizzes and content pages. Both have the same vocabulary attached (Category), and want to create a view showing all quizzes and nodes sharing same category. Is ...
-2
votes
0answers
27 views

Programmatically add a row with total sum in a Views

I am trying to add a row to the bottom of a view with the total sum of each column of this view. Is there any way to do this programmatically? I can't use the Views Aggregator module for that because ...
0
votes
1answer
29 views

How do I print the display name?

I have a view with multiple pages. In the Views interface, I can set a display name for each display. Is there anyway I can print this name in the view itself, for example adding a Global Text field ...
-1
votes
0answers
10 views

How does a rewrite field pass the result to the next field as a parameter in a Drupal View configuration?

picture 1 picture 2 picture 3 picture 4 picture 5 picture 6 Hi all, my question is this: I have two fields inner my custom view. Refer to the picture1. At the Save Accordion ID field, I rewrite ...
-1
votes
0answers
17 views

Adding a taxonomy term programmatically in a view displayed on a node [closed]

my problem is this: I have a view that displays a vocabulary of taxonomy terms, the view is displayed on a node. I need to add another term programmatically to the vocabulary based on some of the node ...
-1
votes
1answer
43 views

Show two content types in same view

Drupal 8 newb here, I have two basic types I need to show in my front page: There’s a “Restaurants” content type and a “Chefs” content type. These are shown in my site like this: The types are ...
0
votes
0answers
28 views

Views entity reference relationship multi field target specific entity [closed]

I need to create a table of users in views. The user entity has a field: field_reports This is an entity reference field. It references a custom entity "reports". field_reports is a multi ...
0
votes
1answer
31 views

How do I alter a view and add/change the form action in Entity View Attachment (eva) with table format?

I have 2 related content types (Order and Proposals). In the Order Detail page, I attach the proposals for that order using EVA with table format. I want to add an action button (vote) in EVA output (...
-1
votes
0answers
11 views

How to embed a view that automatically filters the view as per the taxonomy term used on the page?

Suppose I have two Content Types - City and Destinations. Nodes of Cities will have a view embedded listing destinations of any specific city. For example: India will be of Content type City and it ...
0
votes
0answers
12 views

Change booking end-date in iCal Feeds import

I have an D9 site for a villa that can be rented. To show availability, I import the iCal calendar of bookings from a booking site, using the Feeds and Feeds iCal modules (the last one I updated the ....
-1
votes
0answers
13 views

Simple admin control to control views field visibility

I have a website showing the work of several artists. Each artist has their own page (they can login and edit their page). The page is generated by a Drupal View of type User. Each year there is a ...
1
vote
0answers
23 views

Refresh view using ajax with parameters

I use this code to refresh a view, but It reloads the view ignoring neither page number nor filters. $('.view-id-name').trigger('RefreshView'); How could I pass parameters (page number, query filters,...
-1
votes
0answers
28 views

How do I display the parent node titles, whose child nodes are referenced through a paragraph?

I have two content types. The first content type has a paragraph field. That field contains an entity reference field for the second content type. I created a view that displays all the nodes of the ...
0
votes
0answers
18 views

How can I use the time.html.twig template for the node "created" field?

When a view shows a date from a newly created field, it uses the time.html.twig template. When it shows the node created field, it just prints a string surrounded by <span> tags. I'm guessing I ...
0
votes
1answer
21 views

Calling setExposedInput() from a Drush command doesn't have any effect

We have a custom Drush command implemented using the following code. class JobApplicationExportCommands extends DrushCommands { /** * Exports Dorea Job Applications since the last run to csv *...
0
votes
0answers
46 views

Use first 3 digits of views contextual filter as filter criteria

I have a view that fetches a Belgian postal code, which always has 4 digits, from the URL and uses it as contextual filter to only show nodes for that postal code. This works fine. I would like to ...
1
vote
1answer
18 views

Frontpage slideshow not showing

Here are the steps that I have taken: Created a content type of "slide" with the following fields Title Body Link Image Created 3 slides with "slide" content type. Created a new ...
1
vote
1answer
7 views

Adding conditional comparison of two columns in relationship

I am trying to put value comparision while creating relationship. When i give direct value that works perfectly fine. but i wanted to pass column name with alias to get required results. This is ...
0
votes
0answers
13 views

HTML W3C validation error with BEF: novalidate and name on div

I'm doing a 508/WCAG scan of my site and using the W3C Nu HTML checker. I'm getting two errors both related to unallowed attributes on div elements related to Better Exposed Filters. Attribute ...
0
votes
0answers
16 views

How do I change the main channel <link> url?

I've created a Feed display using a view in Drupal 8. Up at the top of the feed results I see this: <channel> <title>My Title</title> <link>https://www.mydomain.com/&...
0
votes
0answers
12 views

One Taxonomy with multiple views to show content related to a specific term and referenced content

I have two content-type: Job Organisation and a taxonomy: categories The content type "Job" has a field referenced to "categories" and another field referenced to "...
1
vote
2answers
31 views

Loading content in a View via a sibling entity reference

I think what I need to do is use one Drupal View's results to filter the results of another view. Here is what I am trying to accomplish. I have 3 content types (node types): Blog, Blog Post, ...
0
votes
0answers
13 views

How to override the output of a views field of type comments

My goal is to create a views block that shows the comments of the current node. I succeeded in creating a views block that includes only the comments field of the node ID from URL. However, the ...
-1
votes
0answers
28 views

Can I use views to count distinct values of a single value textfield with multiple comma-separated values?

There is a user input field where multiple comma-separated values can be inputted. Multiple users can write different results: user 1 --> field_colors = Blue,Green user 2 --> field_colors = ...
1
vote
1answer
21 views

Creating a view with an exposed filter for "is not empty" where all results are shown by default

I'm creating a view. By default, I want all results shown, with an exposed filter for 'has a value' (aka is not empty) and 'is empty'. I cannot figure out how to make the exposed filter work for this. ...
2
votes
1answer
66 views

How to create a view printing the latest 3 nodes with unique entity reference values

I have two content types, CAR and DRIVER. The DRIVER content type contains a CAR entity reference field. So each DRIVER node creation page can reference a specific CAR. The goal is to build a view to ...
1
vote
1answer
25 views

How can I make 3 different menus?

I need to do an Agenda in Drupal 7. The table for the events is more or less already done, but I would need to add 3 days on the top like: Day 1 - Day 2 - Day 3 Depending on which day is ...
0
votes
2answers
34 views

Create a view filter to find node which have no value in a specific field

I'm trying to create an exposed filter for view which allow to find node which have a specific field with no value. It's a field which lists taxonomy terms. This is not possible with view. When I ...
1
vote
0answers
38 views

How do I display nodes of two different content types that use the same taxonomy term?

I have two content types, typeA and typeB. Both the content types have a taxonomy reference field. I created a view for each content type. In the view showing typeA nodes, I want to show also typeB ...
1
vote
0answers
21 views

Taxonomy dynamic dependent exposed filters

I have a content type with two taxonomy term fields: Region and Country. I created some nodes and entered values for those fields. I created a view with both the fields as exposed filters. When a ...
1
vote
0answers
29 views

Where should I include method to pass current selection to entity browser select view?

I'm following this guide https://drupal.stackexchange.com/a/277898/56676 which I found very useful. So, I understand where the first function goes, but when it comes to the method public function ...
0
votes
1answer
22 views

List all values in same row in a view

I have a view that displays the authors of an article and links to their author page. Currently the view outputs each author in its own row as a list. I'd like to have it display the authors in one ...
0
votes
0answers
20 views

Possible use case for hook_views_query_alter or hook_views_data_alter

We have an Event content type that uses a custom module to allow events to occur on more than one date. We have a View of teasers that displays a list of all upcoming events, each teaser displays all ...
0
votes
2answers
20 views

How can I use contextual filters to display a block with field values from a single related entity?

I've found various recipes/threads with the scenario where have a content type A node and want to display in a sidebar block, all the related content type B nodes, with the relationship based on an ...
1
vote
0answers
25 views

Should I use Aggregation or Query Settings > Distinct to remove duplicate results?

I have a basic view that displays published article teasers. The view has a contextual filter on the article content type's tags field, e.g. field_tags. The contextual filter is configured to accept ...
0
votes
0answers
25 views

Listing articles that matches a specific set of filter criteria

I have a Drupal 9 site with three roles: Editor, Reviewer and Author. I use the core Article content type, with one additional field: field_reviewer. It is an Entity Relation to the user that has been ...
1
vote
0answers
20 views

Programmatically set a views filter value on page load (not contextual filter)

I have created some views for an Events content type with field_start and field_end timestamp fields. One of the displays is for 'Upcoming Events'. I want to filter only those events whose start date ...
3
votes
0answers
38 views

How to get content url in views-view-unformatted block template

In Drupal 8, I created template for solr search view views-view-unformatted--solr_search_content--block.html.twig I am trying to print the content link by {{ row.content['#view'].style_plugin....
0
votes
1answer
23 views

View with multiple blocks, how to specify which is shown?

I have a view that is placed as a block below my main content. Within that view I have block "displays". each having a different contextual filter for their id from url. The problem is when ...
0
votes
0answers
38 views

I get a block that doesn't change on other pages

I have an issue with the contextual filters when I use Content: ID. On the site I get a repetitive, when there are many more recipes. The block remains the same, with two recipes, which is fine, but ...
1
vote
0answers
16 views

Sql query in order of closest to farthest and then in order of most recent to oldest [closed]

How to order set of data with a date field? I have table of appointments that has the field_date_and_time for date. I gonna to sort data according to this field. But it would ideally sort all future ...
0
votes
1answer
17 views

Display Node Local Tasks Menu on View

I have a view that shows registrations for an Event (Content Type). This tab is shown in the /node/{node}/edit: This registrations tab refers to the view, which I have inserted in the routing.yml: ...
0
votes
0answers
22 views

Creating direct external links

I am new to drupal. Is it possible to create direct external links. For example, In a normal drupal website, we create news articles and create a view for them. And once the user clicks on the title ...
0
votes
1answer
93 views

Set a Data Value from Text field to Term Reference field

Node has two fields: Text field Term reference field (autocomplete?) The Text field is old and already has 500 nodes with 500 unique values. The Term reference field is new and needs to contain same ...
0
votes
0answers
28 views

Pass parameters from block to a JSON endpoint using taxonomy term from URL

I've been searching for a solution to being able to pass a taxonomy term on a views block that is on a given page using the term name that is in the URL. I agree with my team that it would be a best ...
3
votes
1answer
46 views

How to create a view filter which display nodes if "field1" - "field2" < $amount

I have a content type with 2 fields: field1 and field2 I would like to create a view filter which display node based on a calculation on those two fields. The filter should display only nodes if ...
0
votes
0answers
35 views

How do I change a display plugin class

I'm attempting to modify the definition of a view display plugin to use my own custom class. I used hook_views_plugins_display_alter(), but it doesn't seem it's invoked at all. I've searched in core ...

1
2 3 4 5
298