We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [views]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
30 views

Setting up an exposed filter to only filter conditionally

I am trying to build a D7 view, and I have the view correctly only showing results using a contextual filter, but I am trying to build one more filter (an exposed one), to drill down even more. I ...
1
vote
2answers
98 views

Why can I choose the widget for grouped filters, but not exposed?

When I create a view (block) and create an exposed filter I have the choice of a Filter type to expose between Single filter and Grouped filters If I choose the Grouped filters I am presented with ...
0
votes
1answer
21 views

Combining Date Start and Date End in Drupal 8 Views Block

I am new to Drupal 8 Views - How do you concatenate Event Start Date Sept 1, 2019 with Event end Date ie: Sept 4, 2019? The end result is they just want the Month and Day to show up like this Sept 1-4....
0
votes
1answer
13 views

Print Title, Header and in Different divs

I have created a view and called content types events from FILTER CRITERIA , created template page--events.html.twig to override design. Problem is here I have called {{ page.content }} which prints ...
0
votes
1answer
27 views

How to pass multiple values in setArguments() and render view? [duplicate]

I want to pass multiple values in setArguments() and render view. I'm using below code but it's showing only 1 value instead of multiple. public function _ajax_generate_request_view(array $form, ...
0
votes
1answer
25 views

Block won't appear on specific language pages

I have a view with a filter to show entries based on chosen language (Configure filter criterion: Content: Translation language = Interface text language selected for page). The view is placed into a ...
0
votes
0answers
12 views

How to render two paragraph fields behind each other in a slick slider?

In my node content type I have two fields which containing different kinds of paragraph types. (How) is it possible to render the paragraphs of the two node fields in one slick slider behind each ...
1
vote
1answer
21 views

Search using view and facet as block

In my project I need facet search as block view that need to be included in content region. So I created View as block and added facet block in header of the view. Also need infinite scroll, so ...
0
votes
0answers
12 views

per-page grouped results in view

I got articles with content types A, B and C ...in an ajax-paginated view I want to show: page1: row1: A1 A2 A3 row2: B1 B2 B3 row3: C1 C2 C3 page2: row1: A4 A5 A6 row2: B4 B5 B6 row3: C4 C5 C6 ......
0
votes
0answers
10 views

How to show referenced products on the individual page view of a product

I use Page Manager to override the individual product display node. I use a panel to show the product. In each product variation the shop owner can reference multiple products via a custom-created ...
0
votes
0answers
9 views

How can I make search_api_solr and views exposed filters work with facets?

I am trying to implement search for a new client's site and am at a loss about how to complete it. Our Setup ApacheSolr 7.x server using search_api, search_api_solr, facets, facets_pretty_paths. ...
0
votes
0answers
16 views

Rest Export Json Format View Does not display all the content

I have exported content based on a content category. It has around 2500 content. When I select display all content, I get no output. When I set Display a specified number of items to 400. I get my ...
0
votes
1answer
23 views

Strange views issue on upgrade

I'm upgrading a site from 8.4.8 to 8.7.7 via Composer. After a few rounds, things seem pretty good, but I'm stuck on a tricky bit: on drush updatedb the process throws an error on Views post-update. ...
0
votes
1answer
29 views

How can I rewrite a content link and replace spaces with dashes?

In D8, I am struggling to build a link in Views. I keep running into either a missing option or checkboxes ignored. I have three fields pulled into views: Content: Title [hidden] .... token is {{ ...
0
votes
0answers
11 views

Can you use views_embed_view in hook_preprocess_node function?

I'm trying to do something like this for a trending blog post sidebar: $variables['trending_articles'] = views_embed_view('trending_articles', 'block'); But when I do it renders the entire page with ...
1
vote
0answers
6 views

How to enable click sorting on count distinct column

I have a table view with a relationship to nodes associated with a taxonomy. Using aggregation, I have a column that lists a distinct count for the number of node references to the given taxonomy term....
0
votes
0answers
26 views

How to attach behaviors after an AJAX load in a view

I am trying to add a reset button to some exposed filters for my view. My code: (function ($, Drupal) { Drupal.behaviors.blog_filters = { attach: function (context, settings) { var ...
0
votes
0answers
36 views

Sort by date in view with results from Solr Search API

I create release notes section for my website where I fetch a paragraph from the specific content type. I have configured one index with fields such as name or status. In addition to that, I added the ...
2
votes
1answer
28 views

How to exclude views fields from display when a node is flagged

We use the flag module to mark items that will have delays in shipping so that the customer knows that those items will be delayed before adding them to cart. In drupal 7, we excluded our "add to cart"...
0
votes
1answer
41 views

Image Style Clarification

Can I get some clarification as to why images aren't being generated for a certain image style in a view? Here's my setup; I have an Article content type which allows for a main image to be uploaded. ...
0
votes
0answers
10 views

Offset gets doubled in hook_views_pre_render()

I am trying to set an offset for some filtered view results, and the offset should only apply when the filters are not set. Here's my attempt: /** * Implements hook_views_pre_render(). */ function ...
-3
votes
1answer
31 views

How to add checklist besides view content? [closed]

I am currently using Drupal 8 and have a content type which contains email field. With the use of views, I am displaying the content title along with email. I want a check list beside each content in ...
1
vote
0answers
16 views

BEF - Multiselect option renders checkboxes instead select multiple

I'm having issues with my VIEW filter, which has only 4 options and is set to allow select multiple options. Therefore Better Exposed Filters (BEF) renders options as checkboxes instead of html select ...
0
votes
0answers
17 views

D7 - Views AJAX error when too many results returned per page?

I have a View that returns a complete list of all my site's users and their data. That being said, I have 1000 users. If my view returns 500/page, I'm able to view it successfully. However, if I want ...
0
votes
1answer
24 views

How do I make the exposed filter values available as tokens for text areas

How do I display (or render in twig) the search term, entered in the search field. When you enter a search term and click on the search button, you will go to the search results page (view). In the ...
0
votes
1answer
55 views

How to access to form field in views-exposed-form.html.twig (exposed filters)

I am trying to customize the template for the exposed filters of a view. I have created the views-exposed-form.html.twig and Drupal loads it fine, following How do I theme exposed filters?. For now,...
0
votes
1answer
44 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 Everything is working good, ...
0
votes
1answer
20 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 ...
0
votes
1answer
16 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
36 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
15 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
13 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
17 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
19 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
38 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
40 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
10 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->...
0
votes
0answers
15 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
49 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
24 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
26 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
25 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
21 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
0answers
30 views

Filter a view based on current user's roles

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 select) only: ...
0
votes
1answer
10 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
37 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
1answer
45 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 ...