Questions tagged [views]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
5 views

Display field label (not key) as views page title in contextual filter

In continuation of these questions: Override title with field label instead of key inside a views contextual filter Display title, based on exposed filter of view Page title from the exposed filter ...
0
votes
1answer
13 views

View Displaying Incorrect Image

I'm not sure what happened with the View I created, but it is displaying the incorrect image when it's on my site. I've selected the Desktop Hero Image to be displayed in my View, but the output on my ...
0
votes
0answers
6 views

Override/remove title of view with contextual filter as a block

I have a block in a page that is a view with a contextual filter. As a block does not have a path, I have to provide a default value "raw value from URL" as per Contextual filter with a ...
0
votes
0answers
17 views

Integrating jQuery Auto Height with Views Infinite Scroll

I have a views block with an infinite scroll (using Views Bootstrap and Views Infinite Scroll modules). The block displays cards and I want them to have the same height. jQuery Auto Height does that ...
0
votes
0answers
19 views

How do I add update/delete buttons to a custom module items list in a table?

I have made a custom form for customers to fill out their selling requests. And made a view item list for the administrator to view the details. Now I want to add the buttons to edit and delete the ...
0
votes
0answers
9 views

Custom User Field Hook_query_view_alter()

I want to dynamically filter a view using the hook_view_query_alter. My goal is to be able to display all the users for the sub-admin in a view that has the same custom field as it. But I don't ...
-1
votes
0answers
17 views

Create dynamic rows and columns in html twig

I have the below code working on a twig file: <div class="view-content"> <div class="views-responsive-grid views-responsive-grid-horizontal views-columns-12 container-...
0
votes
0answers
17 views

How to replace the default page and tab of profiles in the user account?

I created a Views page with the following path to replace the default "Profile" module page for my "projects" profile type: /user/ID/project/list You have to click on "Projet&...
0
votes
1answer
30 views

How can I view the list of referenced nodes when viewing a node?

I have a content type with a Related pages field, which an entity reference field for nodes. How can view those nodes while still on the current node? I tried to achieve this by creating a block view, ...
1
vote
0answers
13 views

Views contextual display based on taxonomy for no value

I have a content type that has a name field and a taxonomy field that contains cities. I want the view to display by default the city as title and the message "nobody lives in city X" for ...
1
vote
1answer
19 views

Parent node needs to display the scheduled date that is referenced in the child node

I'm not sure how best to approach this problem and I'm hoping someone can point me in the right direction. Quick summary of the setup of some nodes: Node A is the parent node. Node B is a child of ...
0
votes
0answers
24 views

How can I make a widget similar to the media library, just for other entities?

I want to make widgets similar to the one that is provided by media library, but just for other entities, for instance Bibliography & Citation or even just other content. Is it possible to build ...
0
votes
0answers
18 views

How to export view's translation?

I used view translate(/admin/structure/views/view/my_view/translate) to translate a filter's label and saved. When I refreshed the view, it worked. Then I went to /admin/config/regional/translate/...
1
vote
1answer
14 views

How to display 'Welcome [first_name] [last_name]' in a custom views block? D8

I would like to create a custom block / view to display a welcome message to the currently logged in user in Drupal 8. I followed this answer but it isn't working for me. Maybe things changed in D8. ...
0
votes
1answer
22 views

Display title, based on exposed filter of view

I've read these questions: Page title from the exposed filter term https://www.drupal.org/project/drupal/issues/3087020 But it did not help. My Drupal version is 9.1.9. I have views displaying ...
0
votes
0answers
26 views

Get View Data programmatically

I configured a view from UI and applied some aggregation logic. I got the result as expected in the UI. But when I try to get the values programmatically, I get something else. $this->view->...
1
vote
1answer
35 views

Using Filter by an entity reference view with Rewrite Results gives “there are no entities matching” error

I'm using Drupal 9.2. I have created entity reference views and use them as filter for entity reference fields (autocomplete widget). When I'm using only "Content: Title" field everything ...
0
votes
1answer
19 views

The view doesn't display products

I've edited the default product type and added a taxonomy term reference field and added some products that reference my product categories. The default taxonomy view isn't display my products, I ...
0
votes
0answers
14 views

Problem with a taxonomy view with Drupal Commerce products with multiple categories

Under Drupal, 9 I've set a Drupal Commerce site where the products can have different categories. For example, having a vocabulary like this: Category A Subcategory A1 Subcategory A2 Category B ...
0
votes
0answers
23 views

Twig sets body class even when region is not rendered in DOM

In the html.html.twig file of my theme if added the following code to body_classes to add a body class if a region is not empty: page.hero ? 'w-hero-bg', So it looks like this: {% set body_classes ...
0
votes
0answers
5 views

Get view count (ajax) on exposed filter block level

D9. I`ve created view (page) with exposed filter (BEF) in block, using ajax. Tryin to get live results count on block level. I know, there is simple way to get results in view header/footer by set in ...
0
votes
0answers
9 views

Count rows with different values for chart views

I'm using charts to display below data. FIELDS Value Type SCORE Number ENTRY DATE DATE Values in SCORE and Entry date field SCORE ENTRY DATE 7.1 2021-04-03 3.2 2021-04-03 2.2 2021-03-02 1.1 ...
3
votes
0answers
27 views

Pre-select a checkbox from an exposed filter

I have a view that lists blog articles. The blog content type has a taxonomy reference field to the 'tags' vocabulary, authors can select 1 or multiple tags. The view exposes the 'Has taxonomy terms (...
1
vote
0answers
33 views

Why doesn't breadcrumb work for taxonomy terms?

I have created url patterns for the taxonomy terms in the "Article category" vacabulary. I want the breadcrumb trail to look like this: "Accueil"> "Blog"> "...
1
vote
0answers
13 views

addField() does not properly ensure table?

When I create a view with a table display, I configure the table columns to be sortable and set Dinstinct to avoid duplicates. I get the following SQL error. General error: 3065 Expression #1 of ...
1
vote
0answers
7 views

Views table display with sort and DISTINCT error: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list

I have a node view, page display with format "table" where the changed date is set as the default sorting order by the table settings. When I set "Distinct" for the view I get the ...
-1
votes
1answer
18 views

How to add anchor to a single block displayed on specific pages within the same page?

I have a basic layout for a Drupal 8 site, created two blocks with block 1 containing menu with static content and links to pages, and block 2 for subscription form, The block 1 and block 2 are called ...
-2
votes
0answers
32 views

How to count number of users in roles?

I need a view with the count of users per role (not names) . I can get a count in the header if I add a count and the person filters by role. But they want one page with all of the roles and number of ...
-1
votes
0answers
13 views

View: Fields copy/reference each other when you add a separate display

So I have a normal page view with a handful of fields. Title, Price, ect. I wanted to create a Entity Reference page so I click add entity reference and it copies my current fields from my page view. ...
0
votes
0answers
21 views

How can I get the ID of a group of fields?

I have an unformatted list view with two fields, the node title and a taxonomy term. I am grouping on the taxonomy term. What I'd like to do is add a class to the <h3> tag for the group title, ...
0
votes
1answer
18 views

Can I use a contextual filter to remove content?

So I have this view that searches for content (articles, blogs, etc.) associated with a particular author name. Is there a way with this that I can pass a contextual filter of taxonomy terms that ...
1
vote
0answers
23 views

Display products related to a content type through a vocabulary

I have different product variations with a vocabulary (Artist) which is also used for the Artist content type. How can I use a view to show the related products which use a specific value from that ...
0
votes
1answer
15 views

How can I add classes to rows depending on the loop index?

I have received a design where they want to have the latest three articles links put on the top of the front page (over their respective images) so that the first is taking left half of the page and ...
2
votes
1answer
32 views

Behavior to use .insertAfter() on load + after each ajax call?

So I have a views page that outputs some elements in the grid. And I have a custom block on the page that needs to be inserted between those elements. On load it using .insertAfter() to randomly ...
-1
votes
0answers
10 views

Can we have widgets like search-box for Facets search

I have a View page, where different types of search present :Checkboxes, Date-Range and Dropdown using Facets. I need to have another search type like full search box, where user can enter full title ...
1
vote
1answer
24 views

How do I create a block that shows content related through a second level relationship?

I have three node content types, called 'pathway', 'page' and 'relation'. The relation nodes I use to connect pages to the pathways. The relation nodes have entity reference fields: endpoint A and ...
0
votes
1answer
32 views

Display a picture from an article related to a product

This is the scenario: There are multiple products (paintings). Each one of these paintings has one author, which is defined with a content type. There is a reference field form the product to its ...
1
vote
1answer
16 views

How do I change pager (# of items) for one page display in a view?

I have a view that will have about 7 different display pages. Some of the pages will have a different amount of items displayed on that page. When I'm on my Publication Page (display name) and change ...
0
votes
0answers
16 views

How to rewrite a Views RSS?

The RSS Views Feeds are very restricted. I created an RSS Views Feed to display the Message (https://www.drupal.org/project/message). I want to rewrite the RSS Views Feed and I want to display the RSS ...
0
votes
0answers
43 views

How can I invoke a custom submission handler for a view field?

I would like to display a button for each content displayed in a view. In a custom module, I have added a custom submission handler to the edit form (hook_form_FORM_ID_alter()) and defined the action ...
0
votes
1answer
17 views

Link to a referenced entity

I have a entity A with an entity reference to entity B, and an image field. I created a view to display an entity A. I want to link the image field to the page displaying the referenced entities B. ...
1
vote
0answers
14 views

Excluding other parent taxonomy terms when one is selected in “Filter criteria”

I have a table in a content views with a list of four content fields: City 1, City 2, City 3, and Tourist. Because the cities were all taxonomy references in this particular content type, I created a ...
1
vote
1answer
55 views

Redirect Search API view result (Leaflet map) to display in a pane

The particular Search function starts as Full Panel Page in a style to a Google Maps Location Search page; Search Input (Block) to the top left overlaid on a current Leaflet map based on the logged-in ...
0
votes
1answer
34 views

How do I use a term as contextual filter correctly?

I'm using Drupal 8. I have a book content type that uses a vocabulary called "book type" as an entity reference field. I have basic page content type which also uses the the vocabulary "...
1
vote
1answer
75 views

Setting custom key names for exported JSON view fields

I have a result set similar to this (using Views RESTful Export): My question, how to change created_1 key and name it something else?
0
votes
1answer
25 views

How to display the first child of a book with the title of the book and keep the url by using a view

Is it possible to display the list of the first child of every book with a view? I couldn't figure that out so I added boolean to the book content type to check which child is the first child. If that'...
-3
votes
1answer
16 views

Attached all images from taxonomy in view

I am creating a view of a content type and content type is linked with you to taxonomy with has images. Now, i have added Relaionship as well. But now if my node is attached to muliple taxmony term it ...
1
vote
0answers
22 views

How to apply a sort criteria to multiple displays without erase each individual criteria?

I have a view with multiple displays and I have some sort criteria applied to all the displays and one applied individually to each display. Now I have to add one more sort criteria to all displays. ...
0
votes
0answers
23 views

How to make a View only show it results if the last of multiple exposed filters has a value selected?

I have a View with three exposed filters. We do not want to show any results until the user has selected a value for the last filter. Is this possible?
1
vote
0answers
21 views

Parent contextual filter

I'm using drupal 9 for a project with a large taxonomy structure. On the parent page I want to show the child terms of the node. Multiple guides i've found have suggested using the contextual filter ...

1
2 3 4 5
296