Questions tagged [views]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
2k views

Making text fields autocomplete in views exposed filters

I want to make a text field auto complete in a views exposed form. I tried using the following code but nothing happens(I don't see that blue icon in the text field): <?php function nk_menu() { ...
0
votes
1answer
833 views

Embed Views remove pager

I have embedded view in a node with following code: <?php $view = views_get_view('articles'); $view->set_items_per_page(1); $view->set_offset(2); print $view->preview('page'); $view-&...
0
votes
0answers
6 views

How to add Download link to File field in Drupal 8

I would like to know how I can make File field type display the upload as a download link, instead of having a link. So that user can just click and it will download). The file field type, I added to ...
1
vote
2answers
3k views

Programmatically change the available options in a views exposed filter

I have an existing view in which I want to change the available options in a view exposed filter. I can't manipulate the form because the modifications are dependant on other views data, so I thought ...
2
votes
2answers
336 views

Reference View in Entity Reference field

I have a content type that has an entity reference field allowing you to link to other pages and add a custom image, for nice big CTAs. However, it's come to light that some of the links may need to ...
-2
votes
2answers
230 views

Clone a node table while all cloned table cells have in-place changeable input placeholders [closed]

To help others and myself learn new human natural languages I want to create a program for translating phrases shared between generally all such languages ("basic phrases"). Although, using this ...
4
votes
4answers
4k views

How do I translate view's page path alias?

I'm able to translate views titles and menus thanks to config_translation core module. I would like to have path aliases translated as well but it seems to lack this feature. Any other way to do it?
-4
votes
0answers
25 views

How can I use “Responsive Images” to implement screenshot list?

I want to implement Screenshot list page where the images are rendered in rows. Each row has given height (say 300px) and the images are proportionally scaled down to this max height. If the image is ...
0
votes
1answer
459 views

How to display previous and next arrows in views

I am trying to create a views block that will display one item on a page. I like to display next and previous arrows but I see the next arrow by default and I do not see the previous arrow until I am ...
0
votes
0answers
29 views

How to correct html code for apostrophe appearing in Views contextual filter select list?

I am finding that taxonomy terms containing an apostrophe are not rendered correctly when seen in a Views contextual filter select list. I am working on as school website and Parent's Evening is ...
1
vote
2answers
541 views

How to get alter value of a views field programmatically

I've developed a Views field plugin that extracts the value from another field in the view in order to apply some math. The plugin works great at getting the original value of the field. However, I ...
3
votes
1answer
1k views

Displaying Content Flagged by User Name with Flag Module

I'm using Drupal 7.38 with the Flag (v7.x-3.6) module, along with Views. I'm setting up a flag for content. My goal is to display a list of users whom are flagging content (along with aggregated ...
0
votes
1answer
14 views

Fatal error when using some filters or sorting options in admin/content

Using Drupal 8.8.0, multilingual, on localhost (Windows 10, PHP 7.3.12). I have a fatal error on the admin/content page, but only if I use certain options for sorting or filtering the results. ...
0
votes
1answer
13 views

How to add class to the options for type radio present under radios?

function template_preprocess_bef_radios(&$variables) { $variables['children'] = Element::children($variables['element']); _bef_preprocess_nested_elements($variables); foreach($variables['...
0
votes
2answers
328 views

Display fields node in table like views

I have a content type documents and my fields (created by admin) are: Doc1 File Date Doc2 File Date Doc3 ... The reason why I don't do a content type just with: "Doc, file, date" and add the nodes I ...
1
vote
1answer
523 views

Content edit links?

I'm new to Drupal 8 and can't figure out a way to show the edit contextual links for content displayed through the Views module. This was simple in Drupal 7, but in Drupal 8, a view only shows the ...
1
vote
1answer
64 views
+50

In views use the value of a field in next row, in current row

I would like to use the value of a field in row 2 of a views table output, in row 1 so that I can do some basic math on it. This is what I would like to do: Title | Field_x | Field_y+Field_y(2) | ...
0
votes
1answer
12 views

How to create a view that shows a Managing User all content of their members?

I want to create a View that lists all content of authors who have the same value (text) as the viewing user. Actually they are members and the viewing user is the manager of the members. I have 2 ...
0
votes
2answers
1k views

How to set the views exposed filters default value programmatically?

I have a view which has a term reference exposed filter. I want to set the default values of this exposed filter programmatically based on a certain condition. I have tried the following code but ...
0
votes
1answer
375 views

How to filter a view with another view?

Let me explain my situation. I have in D7 4 different taxonomy list. Each taxonomy list is connected to other data in the system A content type cFoo 2 different roles : contentmanager (CM) and user. ...
0
votes
1answer
358 views

Views exposed filter resets to first selected value

I have a view on this site's homepage (at the bottom, under Recent Watsits). http://wats.it/ When you filter by category (term id), it works great - once. After that, it just resets to the first ...
1
vote
3answers
3k views

Customizing webform results submission page

I'm new to drupal. I'm using the Drupal 7 version. I have created one webform with Name, gender, program, branch, district, college..etc fields. And now I want to customize the webform result ...
4
votes
3answers
3k views

How do I alter a view query to use “OR”?

The following is the content of the $query object that is passed to a view. [where] => Array( [0] => Array( [clauses] => Array( [0] => node.type in ('%s') [1] => node.status 0 ...
0
votes
3answers
4k views

How to make expandable text on clicking more button in views?

I have created a views with trimmed fields and displaying more button to show the full content.I want to do something like collapse text ie.,when i click on more button it has to expand and show the ...
0
votes
0answers
17 views

Can I Display Date Time as saved in database without DST adjustment in View

My view has data from a Feed that already has the correct time stored. Apparently the view is adjusting for DST before displaying to the user. Thus, my Sales and Service Techs are seeing the ...
2
votes
1answer
423 views

All taxonomy terms of a specific depth

On a Drupal 7 site I have a view with a bunch of exposed filters (using Views + BEF) for taxonomies. Some of these taxonomies have terms with different depths. Is there a way I can dynamically show ...
0
votes
0answers
14 views

Show throbber when views exposed form submits to get results from view

I am using Views Database Connector module to fetch data from a MySQL external database on Drupal 8. The view has certain exposed filters. Due to the large set of data I want to display a throbber/...
0
votes
1answer
328 views

custom views handler to show dynamic all profile fields

I'm using D6 and I like to have a view that shows all user profile fields. The situation now is, that you have to tic all fields that you like to show. I'm using OG profiles and the user is able to ...
0
votes
0answers
17 views

CSS attributes missing from Views Field

I have a field formatter that adds a CSS class attribute to the item by code like this in viewElements $item->_attributes = ['class' => ['my-class']]; It works perfectly when the formatter is ...
0
votes
0answers
12 views

Adding custom module field to views

I am currently fixing a client’s website built on Drupal 7. I created a mini custom module to add one feature. It adds a field to ‘drupal_node’. I was wondering how I could make that field available/...
0
votes
2answers
413 views

Taxonomy filter exposed to user that dynamically only includes terms attached to currently published content

Background: a) Taxonomy: I have built as site that allows users to tag content of a particular content type with tags. The system started with a pre-existing taxonomy before any content was added, ...
1
vote
1answer
351 views

views displaying node reference fields

Will the view chosen (in the advanced settings) of a node reference in a content type get overridden by another view if the node reference field is shared between two (or more) content types? In more ...
1
vote
1answer
1k views

Views escapes HTML tags in node body

I'm creating a view that displays a few fields from a specific content type. Among the fields is the trimmed nody body. The problem is that the HTML tags in the body are escaped and are visible as ...
0
votes
0answers
19 views

How can I create a menu item AND tabs in a view?

Building on How to create views tabs in D8? where the asker gets information on how to turn the different pages in their view into tabs, I would like to also add a menu item for my default tab in the ...
0
votes
4answers
1k views

Add custom HTML into .views-row-1

How can I add some HTML code inside a specific row in Views Now is: <div class="views-row views-row-1"><span class="views-field views-field-title"> .... Would be: <div class="...
0
votes
0answers
10 views

Show all values from multivalued flag in one line in Views

I'm very new to drupal (~3 months). I'm creating a PSU site to manage project proposals. One of the pages I'm creating allows the user to view the submitted project proposal, flag/unflag as interest (...
0
votes
1answer
364 views

Custom sort to preserve order of referenced nodes

I have a node type that references other nodes. When viewing node of Content Type A, I have set up a view that displays all references to nodes of Content Type B on a gmap. This is the code from a ...
0
votes
1answer
348 views

How to add a tooltip popup containing social share widgets in a views table

I have a views table containing a number of columns, one contains a small icon. I would like to have a tool tip open (containing the usual share widgets: twitter & facebook) when the image is ...
6
votes
3answers
530 views

View display plugin “entity reference” not using translation

UPDATE: This bug was just fixed in Issue 2174633 and Drupal v8.7.9 will no longer have this problem. For some of my entity reference fields I'm using "Views: Filter by an entity reference views" ...
2
votes
1answer
334 views

Show Taxonomy Terms belonging to search_api search result nodes

Using search_api (and search_api_solr) i have a view that shows nodes for (in this case) Organisations in a search_view. That works very nicely. Now, I would like to show a list of taxonomy terms ...
0
votes
1answer
331 views

Change label in views php

I am using the views php module and want a custom label. The label field doesn't allow php to be entered, how would I go about changing the label?
2
votes
1answer
369 views

Better exposed fiters with Views: how to show quantity of nodes tagged with certain term?

I use better exposed filters with views. I chose to show field "term reference" as hierarchical checkboxes on my exposed filter. It works great. But now I need to add quantity of nodes having certain ...
0
votes
0answers
4 views

Show multiple drupal 7 'name field' in one view row?

Using this on D7: https://www.drupal.org/project/name The name field is on a 'book' content type. 1-to-many authors. In views, I want to see the name of the book, and the authors. Currently, it ...
3
votes
2answers
371 views

Custom Path Alias with Initial Letter as Token

For various reasons, I need to change my custom path alias for a taxonomy type as follows... FROM: /composers/aardvark TO: composers/a/aardvark So I'm looking at either creating a custom token, or ...
1
vote
1answer
433 views

Entity reference view display is not displaying fields as expected

I have a number of registered users on my drupal 8 website who some of them are "active" and the others are "blocked". I want to add a select list field inside the article content type displaying ...
1
vote
1answer
1k views

How to add twig code in View 'global custom text' field?

I want to add if condition in my "global custom text" field saying if node is published, print some link. I tried below steps , but it is not working: 1.I have added "Content: Publishing status" field ...
2
votes
1answer
392 views

“Content manager: broken/missing”

After upgrading to Drupal 7, all the pictures of the items have disappeared. In the View UI editor, I cannot add an image content and it says "Content manager: broken/missing". Help?
0
votes
1answer
334 views

View does not display attached file without Display field checked

I've got a view that exposes a list of nodes with fields: Title, Publishing date, Attached files. If an attached file has checked the "Display" flag it is visible on the view result, but if the "...
0
votes
0answers
14 views

How to refresh a view after a webform is submitted

I have a webform placed in a block below the webform block I have a view that displays the content now I want to refresh this view after the webform is submitted. The webform is ajax enabled and so is ...
1
vote
1answer
330 views

Views Bulk Operations skip confirmation

I have defined a custom action for a VBO. function expense_action_info() { return [ 'expense_finalize_action' => [ 'type' => 'node', 'label' => t('Approve and finalize ...