Questions tagged [views]

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

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

How to display content tagged with child terms in views?

I have a taxonomy vocabulary general in which I have a reference field to user roles allowed_roles. I have two taxonomy terms. A and B where A is the parent of B. Now I selected test_role in the A ...
0
votes
0answers
15 views

How to add filter criteria by current date in views

I am using Drupal 9 and have a content type with a field "Publish until" (datetime). I want to add a filter in views that it will compare the date in this field with current date. I found a ...
0
votes
1answer
43 views

Contextual Filter Path Alias

I searched for this for some time now but couldnt find an anwser. I am using drupal 9.1.5 and pathauto. I have content types department and depratment news. The news are linked to the department. So ...
-2
votes
0answers
12 views

Filter Views With Tokens on Computed Token Fields

I want to add a filter criteria on my view with a token (ex: [webform_submission: user: name]) on a "Computed Token Field" of my webform. To display the data of my Webform in my view I use ...
0
votes
0answers
12 views

How to aggregate values from fields in Paragraphs based on value of another field in that same paragraph, and display in an aggregated Views table?

Hopefully my title makes sense... I am setting up a Drupal 9 website for internal use as a financial reporting engine and a CRM. I am making use of the following modules: Paragraphs Views Viewfield ...
0
votes
0answers
12 views

unable to load the field_media_img properly within the bootstrap style

While creating a view I would like to add {{ field_media_img }} in a <div class="card-img-top">. Therefore I created a view with 5 fields, all "exluded from display". And a ...
0
votes
1answer
27 views

Views rest export does not update

I have two websites. On website 1 I have a calendar showing upcoming events. Next to a regular views page I also created a views rest export page with 6, of the most near in the future, upcoming ...
0
votes
0answers
9 views

field widget form element not updating #attributes via #ajax callback

I am trying to do a simple update to a form element in my field widget, I have a start and a end dates in the field widget and I need the start date to be the min date of the end date, so I call an ...
0
votes
1answer
31 views

hook_views_query_alter() not working?

Very new to web development and even newer to Drupal, and I have some questions that I would really appreciate if anyone could answer! Here's my yml file, [Site name] is actually just the name of our ...
-2
votes
0answers
14 views

How to make a slideshow with multiple content per slide?

My group is new to Drupal and we were wondering how to make a slideshow with multiple content and/or images per slide similar to the image shown below.. Those highlighted in blue are supposed to be ...
1
vote
0answers
23 views

Facets with 40000+ taxonomy terms make page load slow

I am running Drupal 8.8.1. I have Search API Solr 8.x-2.2 and Facets 8.x-1.3. I have 40,804 taxonomy terms. I added this taxonomy term in my solr index as string. I already have a view page . I added ...
0
votes
1answer
67 views

How to deal with block cached for anonymous user?

I have placed in the site's home, via twig, a views block of nodes with a random sort and obliviously no cache active. Therefore, at each page reload different nodes appear. The problem is that block ...
0
votes
1answer
40 views

How to use “content entity” type in a View?

I have used the "content entity example" coming from the example project. This example module/: defines a "Contact" entity; it can have extra fields, displays can be configured (...
0
votes
0answers
16 views

Fields not appearing in View Rest API unless Bypass group access control

I have a simple content type with lots of fields that I am attempted to expose via the views api. When calling from Postman as an unauthenticated user some of the fields are coming up empty. The view ...
0
votes
0answers
10 views

Unable to use pathauto aliases for taxonomy terms in conjunction with views pages

I'm trying to set up pathauto aliases for a number of vocabularies to work alongside corresponding view pages. However, in doing so, I'm running into a 404s ("The requested page could not be ...
-1
votes
0answers
12 views

View on SOLR search query alter filter [duplicate]

The view uses SOLR search, it has a boolean field as exposed filter, which isn't required and its default value is FALSE. When I added the Boolean field, there was existing content with this field ...
0
votes
0answers
33 views

How to eliminate duplicate results in a view?

I have a view in a D8 site displaying results of the content type "Projects", sorted by the taxonomy "Project area": I'm getting duplicate results in my views output. I've tried ...
1
vote
2answers
88 views

Pass value into a view using block input

I have created a Drupal 9 site with articles that belongs to taxonomy terms. I want to give the ability to the administrator of the site to place a block with whatever taxonomy he wants. How would I ...
0
votes
0answers
18 views

Make Boolean filter FALSE accept null [duplicate]

Have content type Article. Content type Article has a field, called "Need Further Review", of boolean type. This field is not required, default value FALSE. The articles has value TRUE, ...
0
votes
0answers
16 views

I've altered the exposed filters how I want them in hook_views_pre_build(). How do I retain those settings after an AJAX filter is used?

In Drupal 7, I have a content type that displays a content view within it. This view display contains 4 exposed filters. On the content type, I have a custom select field which allows the author to ...
0
votes
1answer
15 views

How to create an RSS or Atom Feed in Drupal (source)?

I have a website with Drupal 8 CMS and I have a second website without CMS. I want to create an RSS or Atom Feed on my Drupal site (this will be the source). I want to display the RSS or Atom Feed on ...
0
votes
0answers
28 views

Making a custom module that alters a view query?

I am super new at Drupal module development, so I wanted a little bit of input on where best to go from here. I need to create a View that shows events in a specific order that the default Views don't ...
0
votes
1answer
27 views

Any idea why view->field is empty when executing a view returning user emails?

We are using Business Rules to execute a view (users) that returns a list of email addresses. It works fine when rule is triggered by admin, but does not work when triggered by other users. In ...
0
votes
0answers
23 views

Custom views filter to filter nodes by field in a separate table

The module I'm trying to build is a very simplified replacement for the Flag module because it is still in beta. The only functionality I need is the ability to favourite some content, which I have ...
0
votes
0answers
43 views

How can I list the nodes for which a Boolean value is FALSE or NULL?

On Drupal 9 I have a content type (Article), which has a not required Boolean field, Need Further Review. Its values are TRUE, FALSE, and NULL, where the latter is used when the node doesn't have yet ...
3
votes
1answer
33 views

Count how many times a node is referenced

I have a content type: classroom I have another content type: lesson Lesson nodes have an entity reference field (field_classroom) that reference classrooms. I want to create a view that outputs a ...
0
votes
0answers
22 views

Adding a new view to an existing module

I am trying to add a new view to an existing module. I created the view using Views UI and exported its YML to the 'config/optional' folder. If I install the module for the first time, the view is ...
0
votes
0answers
16 views

Can I make a page view with a contextual filter use AJAX?

I have a Drupal 7 view that uses an attachment to present a list of links to taxonomy terms, and use that to drive a page view, filtered on the term ID. The links in the attachment causes the page to ...
0
votes
0answers
53 views

How can I create a view of different entity types with common sorting?

Both, profiles and nodes (of one spec. nodetype) have the same taxonomy attached. (Using the profile module). How to create a view of both together, profiles and nodes (of this type) to show as a ...
1
vote
0answers
20 views

Video does not pause automatically when slider change in FlexSlider

I'm using version drupal 7 to create the "slideshow" to display the slideshow of the video, each video is embedded in its own content item. When the user starts to play the video, if the ...
0
votes
0answers
8 views

Loss of formatting (CSS) when making views blocks

This probably requires an easy fix, but I haven't found the solution for it online so far. Basically I have some specific CSS properties for a Views with an HTML list. Each header section is a ...
0
votes
1answer
26 views

Exclude first node with specific value from a view?

We have an Article content type. The content type has a boolean field called "Featured". We have two views setup: The featured article view. This is limited to the most recent article with ...
0
votes
1answer
30 views

Is there a way to see all the available variables inside content?

I am using Drupal 9 with twig files I have a page where in one section I need to show thumbnails of the latest posts. So I created a new view as a block, and placed this block under Content in admin/...
0
votes
1answer
20 views

How do I expose display routes from a specific view as REST API?

I have set up some displays in a Categories view, all with their own path. I want to expose all displays from that view with a REST API. I've already set up a module with a path, but how do I get the ...
-2
votes
0answers
15 views

Excluding images by setting an image's data-a2a-overlay attribute to false

For some reason, it doesn't work for embedded pictures, but it works for straight images. What I did is adding the new piece of code to the rich text editor. It doesn't work for the Drupal media ...
1
vote
1answer
31 views

Why are spaces in the file path rendered with %2520 instead of %20?

I have a custom content entity (service) with a 'file' field defined by: $fields['file'] = BaseFieldDefinition::create('file') ->setLabel(t('File')) ->setSettings([ 'file_extensions' =&...
0
votes
0answers
13 views

Alter #selection_settings for webform entity checkboxes element

I'm trying to alter a webform entity checkboxes element by altering arguments, which are sent to entity reference view. However, following code doesn't alter anything: function ...
0
votes
1answer
25 views

How can I create a table view of entities showing their related entities in the same row?

I have multiple content types, which are in some ways related to each other. Lets say, the first one is "Author". Other ones are "Novel", "Drama" and "Short Story&...
1
vote
1answer
18 views

Correct views hook to alter contextual filter

I am trying to find the correct views hook to alter/add a contextual filter to a views block that's being rendered in a template. (Using drupal_view and the twig tweaks module). The view is setup to ...
0
votes
1answer
28 views

Batch processing possible without redirects?

I'm using the Views Data Export module for exporting Views as .csv. Standard exports work in most cases, but with larger table only batch exports work. The problem with batch exports is that the ...
0
votes
1answer
13 views

Views Json Source data Cached

I'm using the Views Json Source module to load information from a Views Rest Export page on an other website into another website. But for some reason the view is stuck with old information. I'm ...
0
votes
1answer
26 views

Why does rest export give bad result when executed in batch?

In a custom module (association), I have two content entities (member and person). A function _export_association() is called at the end of each hook_entity (insert, update, delete) in order to run ...
0
votes
1answer
39 views

Missing formatter options for field from a custom table defined in hook_views_data()

I integrated a custom database table to views using hook_views_data(). $data['custom_watchdog']['message'] = [ 'title' => 'Message', 'help' => 'Full log message.', 'field' => [ ...
0
votes
0answers
8 views

Conbine two content types in views by proximity

Given two content types A and B, both with geolocation field, I would like to create a view, in which each node of type A is connected with the nearest node of type B (by proximity). The closest ...
0
votes
1answer
33 views

How to alter output of markup on a specific views field

Is there a way to change the output programatically on a specific field in d8 views? I have a field called 'IMCID' which I want to output as a link, but the link is going to change based on the value ...
0
votes
0answers
8 views

Create list of webforms and number of submissions

in drupal 8 how do I create a list of all the web forms (I've got about 80) and show the number of submissions they have. I can do it in Drupal 7 using views but not in Drupal 8.
0
votes
0answers
13 views

Show book tree from page on down

Using Views I've created a block which show the immediate children of the current parent book page. What I really want is a block that shows the total child hierarchy of the current parent book page. ...
0
votes
0answers
17 views

Data is shown multiple times when sorted in views

I'm using the module BibCite that provides a content type for managing bibliography. I want to show a list of all publications with Views. I'm using the fields mode and the citation field. The ...
0
votes
2answers
22 views

Attach view of content by author only to the user page

I am using the EVA: Entity Views Attachment module to create a view of content by author, to attach it to each author's user page. So, for example, when viewing /user/1, I will see a list of all the ...
0
votes
1answer
16 views

Exposed filter in view should display all available values in select box

I added an exposed filter to my view where users can enter the desired value to filter the results accordingly. But I want to make it easier for them by changing this filter to a select box style ...

1
2 3 4 5
296