Questions tagged [views]

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

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

Sorting view results using contextual filters on Drupal 8

I created a views that filter nodes according taxonomy terms passed through contextual filters. Node 1: term1, term2, term3 Node 2: term1, term6 Node 3: term1, term7 Everyting working good, expect ...
0
votes
0answers
5 views

Embedded View Form Ajax not working

I have a an embedded view display (type = embed) with an exposed form and pager. Ajax is enabled for the display. The pager reloads the display via ajax, however the form does not. I'm all but certain ...
-1
votes
0answers
11 views

how to use several views from different tables and display the data in rows with infinite scroll

I got 3 tables in my DB and using views and infinite scroll I'd like to achieve this: show 1 row with 4 items from table A; when scrolled down, show 3 items in one row from table B; then, when ...
0
votes
1answer
13 views

Create a view to list all contents that uses media through any entity reference field

I know it is possible to create view to list all content that is using media through a particular entity reference field. Is it possible to create a view to to list all content that is using media ...
0
votes
0answers
9 views

AJAX HTTP 200 error in Views Field View

I have just installed the Views Field View Module (https://www.drupal.org/project/views_field_view), which enables to append an existing View as a field inside a View. But when I want to Append a ...
0
votes
0answers
14 views

How to decode Chinese characters in while exporting to CSV from views data export module?

I have used Views Data Export module for CSV exporting in views. It works fine but its not able to decode non-latin languages. I didn't find any configuration also in views data export settings. Only ...
0
votes
0answers
11 views

How can I suppress blank address fields in Global Custom Text?

I am using the field_address in my content type (for a Resource Guide record), and in the view I have created it accesses the individual Address:xxxxxx_fields (Address(field_address:xxxxxx_fields))(...
0
votes
1answer
14 views

how to stop a view from executing within a views hook

I am using custom code with a views pre_execute and i want the view to return an empty set if certain conditions are met , or not to return the view at all. how can i do this ? this is what i tried. ...
0
votes
0answers
10 views

How can we set entity refrence view in #selection_settings programtically?

I want to attach "game_name_entity_reference" view to autocomplete field in programmatically. Can we do this by #selection_settings attribute? or any other way?
0
votes
1answer
17 views

Views date exposed filter by year in checkboxes

I have date field. In views I want to add the a date exposed filter. This filter will only display year and we can select multiple years. Just like this I have checked the better exposed filter ...
-3
votes
1answer
38 views

How to change a view field programatically

I want to change the result of a view field in a custom module.I’m not sure which of the hooks to use for this there are not a lot of examples of how to use the views hooks for d8
0
votes
1answer
9 views

How to programatically change a view's style_options when user clicking the exposed filter apply button?

In a Leaflet Map view, the exposed filter is a list(text) field. On user clicking the Apply button of the exposed filter form, I need to programatically change the value of $handler->display->...
-3
votes
0answers
15 views

Infinite scroll on view shows title again

I have a view / display of type page and show 6 items. I set a title and this title is shown on top of the page. When I load more items there is the title again, above the next 6 items. How to ...
0
votes
0answers
9 views

Setting a Default Value for Exposed View Filter

I have a view with a numeric field. I'm using Better Exposed Filters and the jQuery UI slider that comes with it. The value is filtering for "less than or equal." The default value automatically ...
1
vote
1answer
39 views

How to make rows of views blocks on a basic page via the Layout Builder, reacting collectively to an exposed filter?

I have to make a page, containing 3 rows with 3 blocks with content teasers. Preferably the page layout should be made through a basic page content type item, through the Layout Builder, so it is easy ...
0
votes
1answer
21 views

How do I pass the UID in URL to embedded View?

Probably a stupid question, but I'm stumped... I have a simple View which lists all terms from a Taxonomy. Within this is a Global Field Type of "View" which is trying to list any content related to ...
0
votes
0answers
16 views

How can I have facet items set to disabled instead of hidden if no results?

We currently have a Views page with Search API and Elastic Search. There are 3 facets available: Category (radio, single selection) Range (checkbox, multiple select allowed) Type (checkbox, ...
0
votes
1answer
20 views

How can I repeat parent table field only once for a group of child table fields?

I am using Drupal Views module. I have Student accounts table that can have multiple students in it. Is there a way to create a table like the following? ╔════╦═════════════╦═════════════╦═══════╦════...
0
votes
0answers
11 views

How can I allow only one flag per matching field value within a view?

I have a view that allows users to flag nodes directly through the view, I'd like to limit it so that can only flag one item per category at a time. For example: VIEW Category 1 Node A ...
0
votes
1answer
19 views

Rewrite results output creates 2 links for one for one rewritten custom text field

I am using replacement patterns to rewrite the results of my content title field with the manufacturers name in front of the title. I am using the following custom text within the title field to ...
0
votes
1answer
15 views

Filter a view based on current user's roles (D8)

Using Drupal 8 Views, I'm using a view to populate an Entity reference field on a profile. (So it's a view of "Entity Reference" display type.) I want to filter this view to show (and allow users to ...
0
votes
1answer
9 views

How to show snippet of an event when clicked in the calendar in Drupal 7 with the Calendar Module

I created a calendar with the Calendar Module, but I don't know what to do to show a snippet of the event when clicked. This calender is a perfect example of what I mean https://hutchinscenter.fas....
0
votes
0answers
34 views

Views paragraph fields in block Twig template

I understand that I can use content['#view'].field['field_name'].value(rowcount) to get a value of a field. But how can I refer to fields of a paragraph field, that is in a view block in a file like "...
0
votes
0answers
13 views

Views deleted after changing the content field

It happened three times so far. After deleting some field and replacing them with other in a content type some pages are missing or restarting. Of course deleted field were used on that deleted pages....
0
votes
1answer
33 views

In Views, display additional fields from an entity reference

I have a content type with a field that is an entity reference to another content type called "URLs", and the "Allowed number of values" is set to "Unlimited", meaning that one record can have ...
0
votes
0answers
9 views

Default contextual filter to current user but prevent altering the value in the URL

So I have the following content types: User: The default drupal user Document: Title Body ... Linked User: Entity reference (User) Please note that the Linked User does not reference the Author of ...
0
votes
0answers
27 views

When changing values in the database why does this not affect the view?

edit: How could i use Views bulk operations for the change of a field's value? Instead of directly editing mysql? I have a content type, f.e mycontentype, which has titles, like: Title - library1 ...
0
votes
0answers
13 views

Delete a content type's allowed values, and all parent nodes should not show info regarding these values

I have a content type f.e. parts, with the following values: electrical, machine, glass, liquid or NONE I also have a content type, f.e. product, where with a view one can select which part the ...
-3
votes
1answer
23 views

Based on location How to change the banner image?

I am new to drupal 8 how to change banner image based on location. i created one content type in that two fileds i am added one is banner image and another one is location. while loading the page ...
0
votes
0answers
10 views

Display many rows for one webform submission in views

I have a table view that some appointments (webform submissions) are displayed like this: Username| Visit Date | Time1 | Time2 | Time3 My question is can I "split" this row so that a new row to be ...
1
vote
2answers
92 views

How can I add a link on the “Structure” admin page?

I created a view page with the path being /abc and I want to add this link on Administrative page with a link in Drupal 8.
0
votes
0answers
18 views

How to display view table field value in add content form?

First of all, I'm new to custom modules. I have created a view with format as "Table with aggregation options". Now i have a content type, while adding data in that add content,if a form-field-ID(Ex: ...
0
votes
0answers
25 views

How to add a UNION to a query in hook_views_query_alter?

I have a custom multiple-value field (via plugin) in a bundle that needs to have an dynamic entry added prior to rendering in the view. I've tried render hooks. The problem is that if there are ...
0
votes
1answer
24 views

How can I run a Views SQL query in PhpMyAdmin?

i go to admin/structure/views/settings, check Show information and statistics about the view during live preview and then Show the SQL query checkbox that will appear below. I have a field which is ...
0
votes
1answer
20 views

Hook form alter to check date field is empty or not

First of all I'm new to custom modules, I'm using hook_form_alter to do some custom validation, in the middle I have to check if a date field is empty or not, if empty I will display an error message. ...
0
votes
0answers
13 views

Custom Search API sort logic

I have content (multiple content types) which are tagged by a taxonomy that indicates the geographical region they're relevant in. The content is indexed using Search API and Solr. Each user is also ...
0
votes
1answer
29 views

Make my view the default for content type

I am probably doing this the wrong way, so please correct me if I am wrong! I have created a new content type, called "Entities". My content type has many fields, and the default view when you visit "...
0
votes
1answer
28 views

Add content screens from the front end

I am building a web application (for trusted users), so the logged in user will have the ability to add content. However currently, when the user wants to add a record, they move from the frontend ...
0
votes
0answers
31 views

Years missing in Views' exposed field

I have media content I want to add an option for viewers can view by year from select option. I have added Published on and then checked on exposed with year checkbox as you seen in snapshot but it ...
-1
votes
1answer
40 views

How run a view in MySQL

From a view, I get the following in the Auto preview Preview with contextual filters: SELECT node.nid AS nid, node.created AS node_created, node_field_data_field_title.title AS ...
0
votes
1answer
14 views

Create a View that Displays a group of Taxonomy Terms

I have a proposed data structure like this: Asset: Title Image Description Taxonomy term: Campaign Campaign (taxonomy dictionary): term image description I am trying to make a view block that ...
0
votes
1answer
32 views

How can I have a view to load more rows on clicking a “Load more” button?

We have created a view, myview, where we want to display 3 nodes (content type = basic) and add a View All button on page load. The purpose of the 'View All' button will be to show 6 more (the view is ...
0
votes
2answers
66 views

Perform math calculation in views

On Drupal 8 site, I have a exact copy of the below excel example table made with views but without the yellow cell yet. The view is displaying one content type: Client where all the below fields are ...
0
votes
1answer
36 views

views_pre_render add class item to a row

When pre-rendering a view row is there a way to add an HTML class into a single row of the markup, allowing me to add a new background colour to the event item highlighting its importance? This is for ...
0
votes
0answers
31 views

How can I override image attributes for each row in a view?

I am currently trying to write a preprocess to change the img tag on 2 views but with no success using the below code: use Drupal\node\Entity\Node; function mytheme_preprocess_image(&$variables) ...
0
votes
0answers
20 views

Tabs not visible after creating view tabs

I am trying to create view tabs and follow below video https://www.youtube.com/watch?v=hpuRdzyK3jI but couldn't get any tabs displayed, only the results are displayed. I am using Bootstrap Barrio ...
0
votes
0answers
17 views

Search view with group doesn't work well

I think there is a bug with the search in a view: I created a view, which lists some used cars. I use a group filter item. Because cars are in several taxonomies. My problem is when someone uses ...
0
votes
0answers
12 views

How to know what is changing views sql query?

I would like to know what modules are altering the select sql of a view. Is there any way I could know it?. Due to this question I put some days ago, I would like to find why that sql is altered. I ...
0
votes
0answers
17 views

Expose custom db table to views to join with any entity data

We have a db table from custom module which has fields entity_id and entity_type. I need to exposed this table to views using hook_views_data() and it should be possible to join with this table within ...
0
votes
1answer
28 views

Why is my view for Solr indexing is not showing any results?

I have installed solr 8.2.0 for drupal 8.7.6. My Solr server and index are enabled and indexed. But when try to search via views, the results are not showing up. Please help me in solving this. My ...