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

Can't get referenced node to appear in view block

I have recipe and food nodes, and recipe nodes (e.g. My Favourite Cake Recipe) link to parent food types (e.g. Cake). This link is done via a Parent Food content reference field on the recipe node ...
1
vote
1answer
38 views

What is the purpose of rerender FormState property?

I am trying to understand With a taxonomy term view Exposed form in block has incorrect action URL /taxonomy/term/all, not taking into account term id and breaking filtering without AJAX/JS and in the ...
0
votes
0answers
18 views

How do you create skins for the views slideshow?

Supposedly, in Drupal 8 you can create custom styles for your slideshow (Views Slideshow), which the README refer to as "skins". Normally I'd use a css, but the module annoyingly includes a ...
0
votes
0answers
9 views

views template strips SCRIPT markup

I use custom display output views template to add markup to view. Somehow it seems that whatever the template output is filtered through, it strips script tags. Anybody know what function and where ...
0
votes
0answers
9 views

Views entity reference depending on other field in contact form

I have almost the same problem than Peter, here: Entity reference view depending on other field I have a contact form with two fields: brand and model. Brand is a taxonomy field and Model en entity ...
0
votes
0answers
14 views

Configurable Action Form Builder Not Called by Views Bulk Operations

I have a configurable Action that I implemented back in VBO 8.x-3.8, and it was working fine. <?php namespace Drupal\my_module\Plugin\Action; use Drupal\Core\Action\ConfigurableActionBase; use ...
-2
votes
0answers
22 views

How to do query from sql and display result in twig in drupal 8 [closed]

I am new in drupal. I made modul, controller and twig now i need to do query and display result of custom content type on page. Can somebody post me code to see how to do it in which file. Thanks for ...
-1
votes
0answers
9 views

Geolocation Common Map using Custom Table

I have a custom table with some locations and their details (address, lat, long, etc.). I've also got the geolocation module installed and enabled. I want to take the lat and long from the custom ...
0
votes
1answer
24 views

How do you make a Image View of a specific page?

I have a problem. The thing is that I know that you can have a [Content Type] with an image [Field], and then you can create a [View] to display the image [Field] in each of the pages that are of the ...
0
votes
1answer
30 views

How can I add a filter to an export display?

I have a view "Nearest Dealers" that lists all the near dealers. There are two displays - Page & REST Export. I've added a filter(exposed to visitors) that lets customer search dealers ...
-1
votes
0answers
13 views

Add a query parameter to Title field link in View

I have a View that displays a Table, and one of the fields is Title, and that links it to that actual node. Is there a way to append a query parameter in that URL link to the individual node? I was ...
0
votes
1answer
37 views

Filter views for same taxonomy term

I am using D8. I have two views (articles and videos) sharing the same taxonomy (segments). How can I filter the views based on the view type? For example, if I am on the articles page, I would need ...
0
votes
1answer
25 views

Listing child terms based on relationship with parent

The premise: I have a taxonomy listing “countries” on the first level and “country subdivisions” on the second level. E.g.: Canada Ontario Quebec etc.. United States Alabama Alaska etc.. A user ...
0
votes
0answers
11 views

How to recenter a geolocation google common map in views after an ajax boundary filter execution?

On Drupal 8.97 with all updated modules, I have a View that uses a Geolocation Google Common Map as an attachment. The map acts a boundary filter, but after the filter executes Drupal.ajax(...
1
vote
1answer
35 views

Does Quick Edit function work for embedded entities?

I have a view which creates a block of User data related to the author of the node. The view display is a view mode of the User entity. I see my entity when the block is placed on the node page; but ...
0
votes
2answers
25 views

View inside a node with content from a relationship

I have two content types: Artist and Artwork. An Artwork has a field called field_artist which relates to the relevant Artist node. I want to add a view to the Artist node page, so that all artworks ...
0
votes
0answers
13 views

Taxonomy filter on custom view is only showing terms with no children

I have a form that sets the value for parent terms in a taxonomy vocabulary (web_topic). The variable 'search_topic_options' is stored in the variable table with variable_set. The form allows the user ...
0
votes
1answer
34 views

How to add a view tab to node edit form?

I have two node bundles: events and registrations. Registrations have an entity reference field pointing to a given event. I have a view, that list registrations with some event and registrant ...
1
vote
1answer
45 views

How to move views pager to different region as a block?

I created a page view and results are showing up in main page content block. Now i need to move the pager attached with view to different region. I am not sure how to achieve this. Please suggest any ...
0
votes
0answers
18 views

Views contextual filter when page is set as Home / front?

I have a views block pulling in a paragraph. It's set to pull content based on contextual filter "Content: ID" set to a default value of "content id from URL" This all works fine ...
0
votes
0answers
25 views

Display content in arguments array order

I render a view with contextual filters and pass an array of nids to it, which works great. drupal_view ('some_articles', 'block_1', nidArguments ) My view doesn't render these nodes in the same ...
0
votes
0answers
29 views

How can I programmatically change the parse mode?

We have a view that works with Search API and Solr search. The multiple search terms work with single quotes and with no quotes. I want to make the search terms work with double quotes as well. The ...
1
vote
2answers
73 views

What could cause a View template to ouput wrong row index?

Context I have a weird issue on my live environment that I have never seen on my local environment. Cache bins are disabled on my local environment and enabled on live server. When clearing all caches ...
0
votes
0answers
12 views

Elastic search facet

I am Using elastic search APIS and exporting them as a rest view. Now I wanted to filter that data according to the roles and conditions based on the content data. I have done that using the ...
0
votes
1answer
15 views

Ajax callback on Views exposed form filter

I'm trying to add an #ajax callback method to my views exposed form filter select box. But it seems the form have some issues with the callback. My code is pretty simple /** * Implements ...
1
vote
1answer
45 views

Returning custom array in lazy builder callback

I have to return a custom array from a lazy builder callback and then loop through that array in a Twig template for a custom block. Here is my code so far: Custom block: public function build() { ...
0
votes
1answer
26 views

How to be sure that views are saved?

I just had a terrible learning experience. I spent several days building up a bunch of views, only to find that they vanished entirely from my site when I synchronized my configurations to handle ...
0
votes
0answers
32 views

How to use a contextual filter argument (term ID) in a View page title?

This question asks how to use a Views contextual filter argument as the title when using a Taxonomy Term: Name filter. My question is how to set the name of a view page to a contextual filter argument ...
0
votes
0answers
21 views

Cart form view - relation to product variation doubles number of rows?

I'm editing standard "Cart form" Drupal commerce view. I need to get some field from product variation, but by default setup it's not available. So I added relationship product variation and ...
0
votes
0answers
61 views

How to organize the summary of a book?

I created a book with the module provided by Drupal 8, but I am unable to organize the pages of the book correctly in a view. I want to organize the book in this way. In the left block, pages and sub-...
0
votes
1answer
23 views

Filter by taxonymy ID with multiple field in contextual filter

In drupal 8.9 I need to filter by taxonomy ID over multiple fields in the contextual filter of views. How to do this ?
1
vote
1answer
46 views

Block in node view showing but does not show up when rendering node in Views

I have a node type that I have a specific block added to. I have some AJAX going on in the block. When you view the full node the block shows up. When I go to Views and render the full node content ...
2
votes
1answer
50 views

Order item with persistent custom field value

Goal With Drupal Commerce, my goal is to have a customizable product with persistent user entered text. I have added a text field to the order item type and I can see the custom field in the "add ...
0
votes
0answers
63 views

Download CSV file into controller

I made a view with views data export contrib module, thanks to I download a CSV file of some information, for example, I want to export peoples data in CSV format from a view, as I show with the ...
2
votes
1answer
70 views

Contextual views - show articles that the current user is interested in

Aim I am working on a Drupal 8 site that has articles which have a 'interests' field, and each User profile has a 'interests' field. I want to create a view that only shows articles that the currently ...
0
votes
0answers
15 views

View with multiple node arguments using an entity reference

We have a node type called: MEETING On Meeting we have a user entity reference called: PARTICIPANTS I create several MEETING's and reference 2 users: USER1 AND USER2 Now I want to build a dynamic view ...
0
votes
1answer
31 views

Assign a row class like “row-1” for row 1, “row-2” for row 2 [duplicate]

I have a view that uses the Table format. I want to add row classes like this: Row 1: .row1 Row 2: .row2 Row 3: .row3 In the Views UI, if I click Settings under Format: Table, then I can specify the ...
1
vote
1answer
20 views

How can I alter a query adding an OR clause for a relational field?

I have an "Event" node type with a number of fields: title, date, location, description, etc. Because a number of events are similar, we added a "Parent event" entity reference ...
0
votes
0answers
15 views

How to expose the URL alias of a taxonomy term in a View?

I have a View showing Taxonomy Terms as JSON, and want to expose the URL aliases of those terms: { "terms" : [ { "term" : { "name" : "Media ...
1
vote
1answer
26 views

Exclude nodes referenced from another content type's node

I have two content type: Content type A Content type B In content type B I have one reference field which referencing Content type A. Now I want to build a list of Content type A, which is not ...
0
votes
0answers
14 views

Displaying sub content (entity references) of node based only with specific taxonomy

I have been working on a solution that would allow training courses to be created using Drupal 8 as the backbone. I have elected not to use the "Courses" module and am simply using custom ...
0
votes
1answer
43 views

Getting a field value from a view

I am new to Drupal8. In one of the preprocess functions in my customtheme.theme file, I need to get the value of a field from a view that I have already created. I searched the web and got: $view = $...
0
votes
0answers
26 views

How do I inject CSS classes to a rendered field with a view style?

I maintain a module that provides several views styles. I have been unable to figure out how to get the fields where a users custom css entered in the views UI is then output with the view when I have ...
0
votes
1answer
40 views

Count multivalue image field values in views-view-fields.html.twig

Making a presentation template for the gallery. The photo gallery has an image field with multiple values. I need to output the number of gallery photos (in the field_gallery_photo). How do I do this? ...
0
votes
1answer
30 views

How to retrieve view row attributes when in twig template

I am using addClass() in hook_preprocess_views_view_unformatted (see my question regarding this at here), and the class is added to each row, but the next stop for the view results is views_view.html....
1
vote
1answer
24 views

Using hook_preprocess_views_view_unformatted properly

I have the following hook in mymodule.module function mymodule_preprocess_views_view_unformatted(&$variables) { $view = $variables['view']; $rows = $variables['rows']; if (in_array($view-&...
2
votes
2answers
91 views

Custom view sort plugin not working only when used in table sorting

We have a view of committee memberships (= custom entity). The committee memberships hold references to the committee and the politician and have a field "role". In a view we want to output ...
0
votes
1answer
24 views

Change data export download link label

I want to change the label shown to export csv file download link that generated with data export of a view. I didn't get any setting to change the label of download link - download full list.
1
vote
1answer
34 views

Is it possible to combine two filter criteria exposed filter into one dropdown

Is it possible to combine two filter criteria exposed filter into one dropdown. In drupal 8 I am creating a view to search certain content type. One of the content type has three select list field, I ...
0
votes
1answer
11 views

Drupal 8 views watchdog issues

I found a couple of issues with the Drupal 8 integration of watchdog support for views and don't know where to report them. The views watchdog project page only shows issues for the 7.x version. With ...

1
2 3 4 5
294