Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [views]

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

0
votes
2answers
106 views

Print commerce pricing attributes to email receipt

Users cannot see what size or color shirt they purchased in the email receipt because tokens won't print the attribute fields provided by Commerce Product Attributes / Commerce Pricing Attributes / ...
0
votes
0answers
9 views

Data document format issue

I am trying to expose the node data in JSON format using view but having an issue to output the image_URL within the JSON data. If I change the output format to fields/Grid the image render and shows ...
1
vote
1answer
23 views

Filter view list items by user property and item property

I have a view where I want to output a list of content node teasers. At the moment all content nodes are used, but I want to filter the output to only contain nodes that have a certain value in a ...
0
votes
1answer
30 views

Embedding a view for search and redirection

I have set up a view for searching using Search API. In my specific setup, I need this search to be context sensitive, i.e. I have several pages /foo/search, /bar/search, ... and these return ...
0
votes
0answers
26 views

How do I create a “Filter By” option?

I'm trying to make a simple "Filter By..." option section for a View such that when someone wants to narrow results they can do so by clicking a checkbox or link and getting a shorter list, narrowed ...
0
votes
0answers
29 views

Multiple exposed form blocks with different fields

Scenario: View fields: name gender age especialty exposed form block (1) fields: name especialty exposed form block (2) fields: (This is also I want to have but as a separate block) name age ...
0
votes
1answer
27 views

How can I sum aggregate of expression

I have a problem that looks relatively simple. An activity entity has multiple invitation entities, the reference is from the invitation.activity_id => activity. Invitation has a completion_date (...
0
votes
1answer
22 views

views_embed_view not working with multiple values argument

I'm trying to embed views like this: views_embed_view('articles_list', 'block_1', '11+13'); If I type 11 in arguments, it does take the argument. It works good if I preview the view and enter '11+...
0
votes
0answers
18 views

Dont show results a user has no permissions to

I have created a view that list media entities that are related to the module: Groups. These documents have certain restrictions to them. Each document can get 1 of 4 permissions: Permission A ...
0
votes
0answers
21 views

Relationship between views with shared string field been used as id

Issue: (Updated issue description) I need to list all properties where their field_development_ref value matches the new_homes_development content types' field_development_ref. The view will be ...
0
votes
2answers
33 views

How can I filter a view by Content Type -or- Taxonomy Term and have both sets of items show?

I have a basic view that works great. It shows a list of nodes that are filtered by content type. To that list of allowed content types, I want to add a taxonomy term. That is, the view should show ...
1
vote
2answers
42 views

How do I programmatically create a view in a custom module?

I currently have a custom module that lets you create an entity. The list page for this has gotten to be really long so I decided to create a view for this to allow filtering. If this were a new ...
0
votes
1answer
32 views

How to get field values in a View Twig template

sorry for the basic question, I have a Twig template with a View outputting a custom content type, with Format set to show fields.. I have debugged with Kint, but I can't see a fields array ...
0
votes
0answers
11 views

How do I show terms only permitted for a user/role?

I have a view which shows all terms of a vocabulary. I must add a filter that shows only taxonomy terms for which a user or a role has permission. I have installed the module Permissions by Term. Now ...
-1
votes
1answer
21 views

dynamic drop down menu items

I'm new in drupal and I would like to add a link Projects to the main navigation menu: Projects proj 1 proj 2 ... proj n This link projects with a drop down menu with N links. Until now I ...
0
votes
1answer
28 views

How can I change the value of a field in node / [id] / edit?

I should change the value of a field before it is rendered. I tried with [NAME_MODULE]_node_view but it is not invoked when I edit the node. Thank you so much.
0
votes
0answers
24 views

How to reset to default overriden Views metatags?

I'm using a Metatag module and also Metatag: Views. This module works fine, but I don't see how I can reset to defaults overriden Metatags in views. It is possible? From this To this
0
votes
1answer
96 views

How to create custom view/display for few content_types?

EDIT: see two paragraphs below to what I managed to get I can't find a way to use single template for few but not all content_types. Let's say I have content_types A, B, C and D. I want to use ...
0
votes
1answer
29 views

create views for a field submitted more than once in one row

I have a content type that only has one field. (for example weight) The user submits this field multiple times. now I want to create a view that shows all the weights submitted by the user in one row, ...
1
vote
1answer
21 views

How to preprocess group title render in views?

I tried to preprocess a title of the group in the result of the rendering of the view. Example: Actual: Group 1 title Item 1 Item 2 Item 3 Group 2 title Item 4 Item 5 Item 6 Expected: <span ...
0
votes
1answer
40 views

How can I limit displayed nodes by term reference from current user?

I am trying to create a view that to show content classified by taxonomy term and the hierarchy level of the logged in user within that taxonomy vocabulary. For instance, the content is organized in ...
0
votes
1answer
24 views

RESTful view contextual filter to use path alias

I have created a RESTful view in Drupal 8, there I need to display a few of node contents by node alias in contextual filter. View URL: www.example.com/api/book-details/{node-alias} Instead of node ...
0
votes
1answer
30 views

Views contextually filtered by terms in paragraphs

TL;DR, Below are the structure of content types, paragraph types and taxonomy in my site. Taxonomy vocabulary - Category Terms - Sports, Politics, Business Paragraph type - Multi Article Fields - ...
0
votes
1answer
29 views

is there any way to remove “Password reset instructions” hint on reset you password page?

Could not find any hooks or templates for it.
1
vote
1answer
66 views

How can I limit the exposed filters to only display values for which content exists?

We have a view for the Basic page content type, which has a Category field that allows to enter multiple values. All values for Category are displayed (IoT, Cloud, Security), but there are only nodes ...
0
votes
0answers
59 views

Using views field formatter with paragraphs

I've got a question that is a worry to me. So what do I want to do? I'm using drupal 8 with the paragraphs module. I want the content creators to be able to add an unlimited number of paragraphs that ...
2
votes
0answers
22 views

How can I prevent the theming layer being loaded for JSON requests?

I can verify that views-exposed-filter.tpl.php is being loaded for basic JSON endpoints that don't re-render any form fields: My autocomplete - /search_api_autocomplete/...
2
votes
1answer
83 views

Show only rows with highest values

Drupal 8.x I have a view returning: UID: 1, NID: 1, VALUE: 9 UID: 1, NID: 3, VALUE: 8 UID: 1, NID: 2, VALUE: 7 UID: 2, NID: 9, VALUE: 5 UID: 2, NID: 5, VALUE: 4 UID: 2, NID: 7, VALUE: 3 I would ...
0
votes
1answer
32 views

How to get a rendered output field from view object programatically

I can get the value of the field from the view object like this: foreach ($view['#view']->result as $row){ $field_slide_banner = $row->_entity->get('field_slider_banner')->getValue()...
0
votes
0answers
22 views

Views REST Export not stripping HTML tags and adding extra special characters for links

I created a REST export using Views for taxonomy. But, I am unable to strip tags from the description. Also, I am getting extra special characters for links. [{"title":"featured 1","header":"learn ...
0
votes
1answer
20 views

Custom views filter + Add a groupBy in the query() function

On a domain site (domain access module), I want to filter medias/nodes by the related domains to the current user. For this I have created a custom views filter : I analyse the user domains and modify ...
0
votes
1answer
51 views

How do I programmatically render a view that has exposed filters?

I can call a view with contextual filters without any problem, but when I add exposed filter value $view->setExposedInput to the call, I just does not work, the exposed value is not applied and being ...
0
votes
1answer
36 views

Error: Call to a member function addWhere() on array in hook_views_query_alter()

I'm getting the error 'Call to a member function addWhere() on array' in my hook. Any thoughts? I just need to add WHERE clause to my query. use Drupal\views\ViewExecutable; use Drupal\views\Plugin\...
0
votes
2answers
27 views

Solr search views cache issue

I have views for solr search result and I have highlight processor enabled. There seems to be cache issue effecting search result. Search results are rendered array of entities. For example: If I ...
0
votes
1answer
23 views

Adding a filter to a view “or” remove results?

I've got a view that is trying to show three different content types (Lesson, Drill, Exercise), each with three different flags(Lesson Flag, Drill Flag, Exercise Flag), each of those flags have 3 ...
0
votes
2answers
35 views

How can a view page work with multiple word term name

I have user views page with path /members/%. (url as members/term-name).It shows if I use CONTEXTUAL FILTERS with term id but I need url with term name. Anyway , go back to story: academician,math, ...
0
votes
1answer
55 views

How can I set the template to use for a view page display?

I created a view for my content, where fields are displayed as a page. Scanning the source code, I noticed it uses the html--default--2.html.twig template. I created a new custom template. how can I ...
0
votes
1answer
29 views

Need to disable Auto Preview in views for local development in settings.php

Can I add a setting in settings.php to disable Auto Preview in views. I know this can be changed under /views/settings/. But I don't want this configuration added to Git. I only want this change on my ...
0
votes
1answer
23 views

how to display data in view for specific content base on permission

I want to create the view where content of specific type will be visible according to given permission for current user's role. For Example:I have created a role and given it the permission for ...
0
votes
0answers
6 views

Looking for some help with the views_blogspot_archive module

It's not working as intended. I have blog posts, across years. It displays ... ``` 2018 December November October (... and each month in 2018) 2017 2016 2015 ``` It displays the months for 2018, ...
0
votes
0answers
13 views

How do you display a list of blog posts, by year and month with a count

For drupal 8. I want a view that looks like this. 2018 December (5) November (6) October (3) September (8) ... 2017 Month (x) Month (x) Month (x) 2016 Month (x) Month (x) Month (x) A list of months,...
0
votes
1answer
19 views

Entityform view block not displaying on page

I can't seem to get Views-based blocks to show up on an Entityform page (Drupal 7). The View has a Contextual Filter of "Entityform Submission: Entityform submission ID". For the "When the filter ...
1
vote
1answer
30 views

View date filter using years as an offset

Is there a way to use years as a date filter offset? What I want is to set it so that it it loads all content from the start of the previous year. So >= 01-01-2017 this year, >= 01-01-2018 next year, ...
0
votes
1answer
18 views

Decimal number and Charts Module

I installed Charts with Google Charts in Drupal 7. Everything is ok, but when I have to use decimal numbers, with number 0.5 or 0.8, it appears to me .0 or .8 both on the vertical axis of my column ...
1
vote
2answers
42 views

How to get image path in view? [closed]

I have created a content type having two fields: Title Image (multiple image field) Then I create a page view for the same. Added these two fields. Now I have to create an external theming in view ...
0
votes
1answer
39 views

How can I populate multiple blocks on a paginated page?

my problem seemed simple to solve and how to do it. But the paging did not work properly .. As we see in the images, we have: Main block with an image and description. It only shows 1 element. ...
0
votes
1answer
35 views

Remove height of empty fields in Views

I have setup some Structure/Views for items that I am pushing to the front page. I have 2 separate link items (1 displays facebook icon, 1 displays arrow icon) some instances will have both links, ...
1
vote
1answer
34 views

How can I add field to the view?

I have created a view, which displays different content types. I have added some fields for dispalying (image, title, description). The issue for me is that not every node has an image. When it doesnt ...
0
votes
1answer
16 views

How do I display a message to users, with the selections they has made from the contextual filter?

I have a view with more than one contextual filters. For example, filter on Age, and Gender. if the filter is on Age, and/or gender I would like to display a message to the user regarding the ...
-2
votes
1answer
34 views

Sum the value of all nodes fields and display them on the taxonomy page [closed]

How to get result like on the picture? I created taxonomy term - Coins with two nodes. A field_coin_price is attached to the nodes. Using the View I can easily display the number of coins (nodes) on ...