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
1answer
30 views

Based on user's country filter content of same country?

Please find my problem statement here: Show all contents of Type "Test" belongings to that country to corresponding user of that country My Approach: Created a taxonomy term of country, Mapped ...
0
votes
0answers
24 views

Duplicated content on multilingual site

I have a site which is bilingual (English, Greek). When I create a view with content, I get duplicate entries of the content. In the view under Rendering Language I have Interface text language ...
0
votes
1answer
23 views

Views filter criteria date field is greater than current date

I have a overview page with different events. Now it shows all events which were created. But I will that it just shows all the future events. The content type has a datefield for the eventdate. I ...
0
votes
0answers
23 views

use-ajax Class does not work if used in multiple views?

What seems like a pretty straight forward implementation of ajaxifying a link is not working if I use it in more than one view block on the page. I have a route that calls a function. In my view I ...
0
votes
0answers
24 views

How to sort content by moderation state label?

I have moderation state column in my view (table display). When I sort the moderation state column it works as required and sorts by machine name. How can I sort by label instead of the machine name?
-2
votes
1answer
36 views

How to make a view with dynamic Items to Display?

I have a website that has a give away of tickets for shows. Some times I have 2 tickets to give, sometimes 20... So I wanted to know how to dynamically change the "items to display" accordingly to ...
0
votes
1answer
18 views

Add a view with a contextual filter not on a node/taxonomy page

Druapl 7 - I have a taxonomy vocabulary called ‘Destinations’ and an entity created called “accommodation”. The accommodation entity contains names of individual accommodations, to simplify, let’s use ...
0
votes
2answers
28 views

How can I override the sort variable?

For my view in Drupal 8 I have added a sorting criteria based on the custom field. Now, when I sort the content in the url one can see a sorting value as a name of that field. Like ?sort_by=...
0
votes
1answer
39 views

Can Display Suite be used for “Show: Fields” as well as “Show: Content” to be able to rewrite field output?

I need to be able to adjust field output in view results but also want to make use of Display Suite for layout. However, it would appear that Display Suite is only available for "Show: Content" and ...
0
votes
0answers
6 views

let user change view that populates EntityReference field by checking a checkbox

I have a form with an EntityReferenceField that uses a view with three filters. I also created a checkbox on the form that when the user checks it, the filters in the view that populate the ...
0
votes
1answer
16 views

How to make one view with different taxonomy terms in different rows?

I want to make a view with 3 rows of lets say fruits, with 6 fruits max for each row. Spring, Summer and Autumn fruits. And I don't want them to be mixed in one array so I could style them in view-...
0
votes
0answers
22 views

Store per-user data in field and extract using SQL in Views sort plugin

TL;DR: This is less a question about how to write a Views sort plugin, and more whether I can serialise key/value pairs and selectively sort by one of them using SQL functions. I have a content type ...
0
votes
1answer
22 views

View conditional logic based on dropdown value

I have a view that is outputting fields from a paragraph. I want to be able to output different markup. There are two available values in the dropdown 1|Wrapping Link 2|Internal Link and they should ...
1
vote
2answers
86 views

Unable to access Views fields in block Twig template

How Drupal 8 uses Twig, how different data is transferred from general template to specific templates? For view block I have created block template as per default template suggestions. In my new Twig ...
0
votes
0answers
11 views

Why isn't my block refreshed?

I've using Views AutoRefresh module to refresh my view once the content updated but with the famous Ajax error ("An error occurred while attempting to process /system/ajax") in Drupal 7 and no ...
0
votes
0answers
15 views

Dynamically set filter criteria in view - based on a date related calculation

I am trying to find a way to achieve this, but no matter how much I searched for 'dynamic filter criteria' and relevant info, I find no light .. I 'm fairly new to Drupal and haven't tackled anything ...
1
vote
1answer
53 views

Override field twig template in views

I am trying to override the field rendered in a view. The field name is: this_is_field I copied the /core/modules/views/views-view-field.html.twig and placed it my theme folder. I renamed with both ...
0
votes
0answers
13 views

Want to display newly added field collection item on top

I have a field collection item named 'fields_projects' I have a view which display all the resumes in the database Now, when you click on edit link it takes you to the edit resume page. There is a ...
0
votes
1answer
23 views

Separate grid rows by field value

I have a custom content type with fields in which I collect, among others things, country. I'm using Drupal 8. I'd like to create a grid view page (using Views) of the content that is separated by ...
0
votes
2answers
22 views

Link to outlook: protocol in Views

In my website, I'm creating a dynamic external link to open email from Outlook using outlook:{Entry ID} link. It should be like: outlook:...
0
votes
1answer
27 views

Events list filter based on month

I have created events list views in Drupal 8. See, I have used calendar module to map events date with calendar. I need to change events list when changing calendar month. If I change calendar month ...
1
vote
1answer
15 views

Show content that is tagged to both current node and translation source

I'm using Drupal 7, i18n, Views3, translated_entityreference, and Entity Translation. http://lingtransoft.info/apps/paratext I have a content type: Training Resource, and each Training Resource is ...
0
votes
1answer
43 views

How do I manually group content?

I have created a wishlist in which those nodes are showing which are flagged, Wishlist working fine The next task is to create favorite groups. That is, the user must be able to create groups of ...
0
votes
0answers
19 views

Add programmatically exposed filter to view without removing the existing ones

I want to add an exposed filter to a view which contains already exposed filters but without altering them but when I add the code it messes the exposed filters from the view and only the ...
1
vote
1answer
15 views

How do I create a block only for the user “owning” the profile page?

I made so the logged in user have a recap of their last comments/added node on their profile with a view. As I am making the profile page public, I need to be able to hide those blocks from others ...
0
votes
0answers
33 views

View results to show results in language of current page, but if no translation available show original language?

I need a view to display results based on the following: if the content has a translation available in the language of the current page, show that one if the content DOES NOT have a translation ...
1
vote
1answer
36 views

How to get term ID from translated term name?

I have a custom argument validator for Views, which expects a term name input and outputs the tid for the query. This works great in English, but I'm not sure what to do for translations. Is there any ...
0
votes
0answers
20 views

How can I use views to render different entities based on the taxonomy item?

I'm working in Drupal 7 and I have a taxonomy similar to the following: Country > State > City When I navigate to a page for Country, I want it only to show States. Then, if I were to navigate to ...
1
vote
0answers
17 views

Views: Filtering by latest of end dates in multi-value field collection

I have a content type that contains a multi-value field-collection field (itineraries). That field collection has another multi-value field collection field (legs). The legs field collection ...
0
votes
1answer
13 views

Views Geolocation field proximity: How to alter views field setting

I'm using a Geolocation field in views to order results by distance. The module provides a special views proximity plugin/field, which can be used in the "sort" section of the view. This plugin/field ...
2
votes
1answer
19 views

Multilingual REST export

I have Drupal 8 site which interacts with a React component. I want to expose one of my content type's content using REST export in views. How do I set views path to create REST export for ...
2
votes
1answer
22 views

Display block content in current language

I have multilingual Drupal 8 site. I want to display views block in home page. It should display block contents in current site language. Example: I have content type called "Book". Which has ...
-2
votes
1answer
36 views

How to create flag link views?

How to create flag link in views ? Is it possible to add flag link in views programatically ? In drupal 7 it was possible with views php field in such way <?php if ($node = ...
0
votes
0answers
10 views

How to reuse math calculation field result in a different view

I have a View containing 6 fields with integer values, all coming from imported User information, and a global math field that calculates the sum of those fields. [ "Total Schools Owned (computed)" ] ...
0
votes
1answer
35 views

Is it possible to do a user search by taxonomy?

my question is because I have users with a taxonomy field and what I want to do is search for those taxonomies. Example: a user in his profile chose a taxonomy, let's say soccer. I want to make a ...
0
votes
2answers
34 views

How to remove exposed filter if value is supplied in url?

We have a view page (path = /some-path/) that has an exposed filter called category. The detailed view setup is below. How would we hide the exposed filter if it is supplied from the url? View setup: ...
0
votes
4answers
53 views

Give priority to one filter over another one when limiting the number of results

I have a view with a filter which returns the nodes which contain the word "word" in the field "title". I limited the results to 3 nodes. If there aren't 3 nodes, the rest of the nodes will be the ...
0
votes
0answers
17 views

Content block layout [duplicate]

I am not sure how to explain this as I have very little experience with Drupal. I built a site with Drupal 7 and now I am trying to recreate it in Drupal 8. I have a problem with the Content area n ...
1
vote
0answers
25 views

Using Views to Filter on a property of all relationships

Let's say I have a node Exercise that has multiple-entity reference field, pointing to Skill nodes. Those Skill nodes have a field Skill Score. I want to only show the Exercises where every Skill ...
0
votes
1answer
22 views

Hide fields from a view

I am not sure how to explain this as I have very little experience with Drupal. I built a site with Drupal 7 and now I am trying to recreate it in Drupal 8. I have a problem with the Content area. I ...
0
votes
1answer
15 views

Related events block

I have a content type, Venues and a content type Events. In the Events post type, I have 'field_hosted_by' - allowing me to select the relevant venue. On each venue page (/venue/venue-name), i'd ...
0
votes
1answer
21 views

lost password “user-pass” form no more redering

We didn't touch our templates and the "lost password" form is no more rendering. here is my template code working fine with $login_form. <div id="login-container"> <div class="login-hint"...
0
votes
1answer
36 views

Content type Text field as Geolocation source field in View

I have a text field(named as address) in my content type and I will store the address in that text field. Here I don't want to store the address in geolocation field so I have to use text field to ...
1
vote
1answer
19 views

Views switches to another view on apply or any change

When I'm working on a block display in Views on Drupal 7, and hit the "Apply" button, I'm taken to the master (or first view), instead of staying on the block display that I'm working on. How do I ...
0
votes
1answer
30 views

How to display node's first created date

There are options in views to display date regarding Node: Authored On : Displays When node was published, its modifiable, hence not a true created date. Changed : Displays last updated date. Same ...
0
votes
1answer
12 views

Show content with a date after the current one on a view

I'm creating a calendar of events with Drupal 7 using views. At the moment the elements are shown in order of the date of each one (I have a date field where I put the date of the event). Now I need ...
1
vote
3answers
47 views

Views fields not displaying for anonymous users

I am trying to create a View in Drupal 8 which displays the list of Username,Email,Role,Created Date and Status in a tabular format. I am able to create the view and display all the fileds for ...
1
vote
1answer
72 views

How to get the selected items (with VBO) in the buildConfigurationForm of a custom Action

I have made a custom action which have a configuration form: class MyAction extends ConfigurableActionBase Thus, I have the opportunity to create a form that allows the user to set some options. ...
0
votes
0answers
14 views

Unable to save language option

I need to translate my news list in another language but when I try it to change/filter list according to the current user language then option doesn't save. Provide any help which is easy to me ...
0
votes
1answer
26 views

how to get views field names/values for hook_views_pre_render?

I'm trying to figure out how to modify a view's results with hook_views_pre_render. How do I get the available values to work with? I've turned on Devel and Kint, but I don't see any array on the page ...