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

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

1
vote
4answers
21 views

In 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" and if not meaning if there arent 3 nodes which have the word "word" in the title than display ...
-1
votes
0answers
31 views

Why does my page view show a 500 error in the browser? [on hold]

I created a view to replace the user's page. I want that when a user visits another user's account, he has a 403 error. Here is its configuration : When I go to the account of the current user, it ...
0
votes
0answers
16 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
17 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
34 views

How to alter view query of existing view?

Is it possible to alter query of view ? My current view is showing this query . SELECT node_field_data.nid AS nid FROM {node_field_data} node_field_data WHERE (node_field_data.status = '1') AND (...
0
votes
0answers
15 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
8 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
14 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
23 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
17 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
28 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
2answers
31 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
23 views
+50

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
0answers
12 views

Display bitext in Drupal [on hold]

I'm newer in Drupal and I would like to know If there is a module that I can use to display in my website a text with its translation, side by side. Thanks
0
votes
1answer
16 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 ...
0
votes
0answers
16 views

Entity->getTranslation is not loading the translated fields when user does not have admin role

I am using view_unpublished module to allow users with certain permissions to view unpublished nodes. However, on content overview page authenticated users that have appropriate permissions are unable ...
0
votes
0answers
18 views

How to list needed permission in views

I have a view which is not displayed for anonymous users. I have checked everywhere and I couldn't understand why this view doesn't show up. The only way I found is to check "Disable SQL rewriting".. ...
0
votes
0answers
28 views

Twig Math in Views Rewrite results

I created a View and added 3 different numeric fields from different Content Types . Two fields of content type - Gold: field_price and field_testing One field of content type is Weight. ...
0
votes
0answers
16 views

Custom date filter by list of days

In my content, I have a date field with format day, month and year. In my wiew, I want to display a filter of this date field with a list of dates that I can choose to filter my content. To explain ...
1
vote
0answers
13 views

How to link from a group of fields in a View?

I am using the Search API module in Drupal 8.6.3 and I have a page of search results displayed using Views. Each search result row consists of a number of fields. I would like to link each whole ...
0
votes
0answers
10 views

How to get a file path of the node?

For my Drupal 8 website I need to implement a PDF downloader. I have created a content type; which has a "File upload" fields. I have created a view, where all the titles of the nodes are displayed. ...
1
vote
0answers
16 views

Duplicate rows when getting list of latest revisions of a content type

I want to create a list of latest revisions of a content type, in a specific moderation state to use in a custom dashboard. It needs to have the following fields listed in a table form. Content ...
0
votes
1answer
21 views

hook_views_pre_render - how to print field x after each loop

I have a grouped view that displaces content containing multiple entity references. I have a field that generates multiple times, because of those entity references. I've looked into modifying views-...
0
votes
0answers
40 views

Broken/missing handler in my custom Views field

I install my custom views field but it returns Configure field: Broken/missing handler views1U.views.inc function views1U_views_data_alter(array &$data) { $data['node']['hello'] = array( ...
0
votes
1answer
40 views

Adding custom html and css to views header and footer

Is it possible to add custom HTML and CSS in views header and footer using the administrative UI? I am trying to add a header to my view but that is not giving me any option through which I can add ...
0
votes
1answer
45 views

How to setup view to filter based on second URL parameter?

We have a view, myview, that is added to the https://www.adomain.com/some-page/ page. It has an exposed filter, Topic that a person can use to filter the user where Ajax = Enabled so that it loads the ...
-1
votes
0answers
19 views

How to strip tags for views exposed filters?

How would we securely striptags in a twig template for an Exposed Views Filters?? If this is not possible, what is the alternative way to do this securely? Example: myview has a filter criteria ...
1
vote
0answers
18 views

views grouping template change - move 2nd grouping below?

I've got a Views listing, grouped by two fields. Within this, I have an entity reference with multiple entries. What I want is to relocate the 2nd grouping title to below each listing. I've got a ...
0
votes
1answer
28 views

How can I override the page title using contextual filters?

I have 3 contextual filters in a view and I use them to override the views title. However, still, the page title (title in the browser tab) are still using the default title of the view. How can I ...
0
votes
0answers
23 views

How to override views title using values from several contextual filters?

I have a view where the user can filter by using contextual filters in the URL, like this: timeline/%year/%month/%day I then use these contextual filters: Content: node.field_daterange (year) ...
0
votes
0answers
21 views

Get Data from a Relationship Field in Views Template [duplicate]

How do I programmatically get the data from a relationship generated a field in a view template? The field is working on the views admin page but it won't show my template. For example, this works for ...
-1
votes
2answers
31 views

How to hide certain taxonomy views from user?

I have one general taxonomy view wich has this alias mask /taxonomy/term/%. What I need is to hide views for certain taxonomy terms like 'canada' from display while it'll remain showing the other ...
1
vote
1answer
34 views

How to display list of nodes by number in views

I want to put my custom list of ids to views filter but is seems to work only for one id. How can I do it for this list for example (1, 5, 9, 12, 455)
0
votes
0answers
20 views

How to display a grouped exposed date filter as links?

I have two exposed filters and two sort functions whose items I all want to display as links. For this I'm using the Better Exposed Filters module which works perfectly, except for a grouped date ...
0
votes
1answer
50 views

How can I return a <img /> and <div> in my custom view field? [closed]

public function render(ResultRow $values) { return "<img height=11 src='$base_url/sites/default/files/images/red-dot- image.png><div style='color:#008000'>$chassis_link</div>&...
0
votes
0answers
29 views

what is the best practice for show format in views? [closed]

My question is: is it better to use when creating views ? content show format field show format In the first option the configuration is made in the view edit and in the second option it is made in ...
0
votes
0answers
12 views

How to include the content of the nodes into PDF? [duplicate]

On my Drupal 8 website I have created a view with a list of nodes. Currently it is a list with titles. Down on the page, using "Entity Print" module, I have added a button, which lets me create a PDF ...
0
votes
1answer
16 views

How to list nodes in a view as checkboxes?

For my drupal 8 website I need to create a view page with nodes of particular content type. I need to dispaly them as a list of checkboxes, and further implement a PDF manual, composed out of the "...
0
votes
1answer
31 views

how to use “views field view” for entity reference - Not taxonomy

I've got a view of "webinars," that contains an entity reference "speakers" that can have multiple entries. I can't get those entity references and their own fields into the listings for each webinar, ...
0
votes
1answer
31 views

Programmatically render a custom form in a view template while passing view argument to form

I have built a custom form (in its own module using FORM API) and have exposed this form also as a block using Plugin API. I can add this form fine to page and get it to render using Block Layout but ...
0
votes
0answers
24 views

Where are the settings for the XML option style in Views Data Export?

Using Views data export I don't find the settings for the XML option style like in the D6 version. Where can I find that option in D8?
1
vote
1answer
19 views

can we change block title using template_preprocess_block?

I am having a need to dynamically change the title of a block. Here is what I am trying but no avail. function MYMODULE_preprocess_block(&$variables) { if ($variables['elements']['#id'] == "...
0
votes
0answers
10 views

Getting the output of a Views aggregation into a field and compare it with another value

I have a parent entity that maintains a treshold (integer) which the children entities together cannot exceed. I created a view on that, through aggregation, gives me the SUM of all childrens fields....
0
votes
1answer
25 views

How to group by one field

I have a view which shows the users subscribed to the website. Some users have multiple roles, therefore, on the results, there are some duplicates. What I want to do is to remove these duplicates, ...
2
votes
0answers
40 views

How to change the title of a modal window?

I have a link that displays a modal window. The link redirects to a page view. When I click on it, it is marked in the title of the modal window Array. How to customize the title ? <?php ...
0
votes
1answer
16 views

How can I add a condition to the list of taxonomy a view is created from

I've created a view using a taxonomy term let's say (a,b,c,d,e) A content type can have multiple selections of these taxonomy term. The view returns the content-type based off the taxonomy term ...
7
votes
1answer
56 views

How do I display the last person that edited content instead of the original author?

On the page /admin/content, there is a column for Author. We have a lot of people editing our content, so the original author isn't all that important. I want to change it to show the last person that ...
0
votes
2answers
48 views

Show last node of every term in one Views

How to show the last node of every term using only one View? That's what I want to get: news/football - last node of the football term news/boxing - last node of boxing term. How can I do it?