Questions tagged [views]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
15 views

Entity relation field view

I have a D8 entity reference field question. I have 3 content types: Student, Class, Book. A student can have several classes and a class can have several books. I have in student an entity ...
0
votes
0answers
18 views

How to get user's current language code in Views?

On Drupal 8.7.10 How can I get the user's current language code into Views as a raw value, such as 'en' or 'fr-ca'? This is not for filtering content. I need the raw value of the users' current ...
0
votes
0answers
10 views

How to add a (not available) relation to a View?

I have 3 custom Content Entities (ContractSubscription, Member and Person) with a bunch of field of which these ones: In ContractSubscription, the id field is defined by default and the field ...
0
votes
0answers
9 views

Ajax callback is not working on views exposed filters

I am implementing dependent filters in views exposed filter for content:datasource search(Solr search). I have a requirement that in exposed dropdown field when a category is selected, by ajax i need ...
0
votes
0answers
17 views

Create View that list all bundles of entity depending a taxonomy

I will try to be as clear as possible. The arborescence looks like that: | Taxonomy_Name | Tax1 | Tax2 | Tax3 | Tax4 | Entity_Name | Bundle1 | Ref to a Taxonomy_Name ...
0
votes
0answers
7 views

How to display 'Sort by' filter dropdown in results section?

I have a search page that has filters on the left bar and results on the right. I want to display the 'Sort by' drop down on top of the 'Results' section. I have a custom template for the results ...
-3
votes
0answers
10 views

Drupa 7 getting error of production file on local server such as xampp [closed]

drupal 7 website ulr on production server like www.drupalweb.com and i want to setup on local machine on xampp server as http://localhost/drupal_7/, but get encountered error how to config this?
-1
votes
0answers
10 views

iterate on views in order to get views total rows programmaticaly, for each organic group member

In order to get the number of rows a view returns, I could add an element on Header, from the interface. I can cLick "Add" in header section and then add a "Global: Result summary" field. If i have ...
1
vote
2answers
32 views

How can I filter child terms in an exposed filter by parent term from contextual filter?

I have a vocabulary of Districts with nested taxonomy terms like below. I have a view of taxonomy terms in Drupal 8 which has an exposed filter of all terms with parent and child. What I want is that ...
0
votes
1answer
17 views

How to add Download link to File field

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 ...
0
votes
0answers
32 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 ...
-4
votes
0answers
26 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
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
1answer
13 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
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 ...
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
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
1answer
29 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 ...
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
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 ...
0
votes
1answer
16 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
0answers
22 views

How to render related nodes by vocabulary X on vocabulary Y terms?

I did many research about related nodes by term. These solutions are good with related nodes by term on node pages but does not work on term pages. Solutions I found: Add "Content: Has taxonomy term ...
1
vote
1answer
91 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
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
1answer
18 views

Display view on all page routes

I would like to display a multi value media field and its file type and size in a content type and display it in a table layout. I thought using a view would be the best way to pull the media file ...
0
votes
1answer
23 views

Display the URL of where the content is located in my search results

I'm using SOLR search/search API on my Drupal 8 site and I've set the view to display the following two fields: Content datasource: Title (The title & link to the page) Search: Excerpt (...
0
votes
1answer
17 views

Taxonomy Term View with Expose filter Dropdown of Terms Name

I Have a view of Taxonomy and "not Content". In this View I want a Expose filter of Term Name. But when ever i add Term Name as expose taxonomy's filter it shows text box and not Dropdown. Without ...
0
votes
1answer
18 views

Entering views result to field through rules

When I create a new OG, I would like the user with the least number of OG subscriptions automatically to be added to this group. So I created a views block where I count and least the user with the ...
0
votes
1answer
15 views

Show administrative description in Views

I am needing to do a Views report for all webforms on our site (we currently have 27 forms) that can show me the total submission count per form. The issue I am having is that we need the Views ...
0
votes
0answers
11 views

How to get the node title which is related to file in File usage view?

I am just trying to list out the nodes which are linked to files in the File Usage view. That will show up in this URL: /admin/structure/views/view/files/edit/page_2. In this view I tried to add ...
0
votes
0answers
10 views

How to display field labels in Views lists that show full content or rendered entities?

I have a view that displays multiple content types and for this, I went and created custom displays. It works fine except that Views seem to strip all fields from labels. I did a dump of twig fields ...
-2
votes
0answers
23 views

What's the correct naming suggestion for overriding a views template? [duplicate]

I have a view that lists links to all of the pages in a certain content type. How do I create a template override for that view? I've tried: views-view-unformatted--my-view-name-%.twig.html And ...
-2
votes
2answers
235 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 ...
0
votes
0answers
42 views

Strange AJAX HTTP error, 302 redirect error after update and migration

I have a Drupal 7 site (ver 7.67) running on CloudWays, PHP 7.1, MySQL 5.5. I get the AJAX error "An AJAX HTTP error occurred. HTTP Result Code: 302" The debugging information is limited: "Path: /...
0
votes
0answers
24 views

How can i set the custom column class field in a view to accept colons?

We are using the uswds design system in our Drupal template. I have created a view and set the Format type to be grid. I want to setup a responsive grid layout. Under Format -> Grid -> Settings ...
0
votes
0answers
9 views

Creating search form that will query SQL database and display results on a custom block

I am new to Drupal and have learnt about custom blocks. Basically, I am trying to create a search page where on the left column will have all the filter/search criteria. On the right column the ...
0
votes
0answers
11 views

Bulk update fileds integration with Address field

I am trying to bulk update nodes that contains Address field using the bulk update fields module with no luck. I created an ticket in the issue log and had a response from the developer, nevertheless,...
0
votes
1answer
30 views

Displaying multiple fields in referenced webform option?

First I have a content type Quiz option which represents one option (answer) for a webform question (field). Then I have a (entity reference) view which is collecting specific number of nodes in this ...
0
votes
1answer
34 views

How do you get the url of an image in a view twig template?

I want to check the fields.field_image.content to see if it is empty or not. I want the view to display differently if there is no image in the page field_image field. I was thinking I could just ...
0
votes
0answers
19 views

How do I add the View field to another View?

I'm trying to add a field for Revision Author to /admin/content following the instructions located here: How do I display the last person that edited content instead of the original author? When it ...
0
votes
0answers
34 views

How to test a custom filter on existing view?

I programmatically created a new (custom) filter for the user's view (admin/people). Code for the filter: hook_field_views_data_alter() Plugin > views > filter class The filter works ...
1
vote
1answer
31 views

How do I modify the URL to a taxonomy term?

I have a vocabulary called Industry with four terms. I have edited the terms to keep the URL to be automatically generated. They are following this convention: industry/term1, industry/term2, etc... ...
0
votes
0answers
29 views

How do I per-variation add to cart button with no selection?

I have a table that displays rows of products with there attributes, the last item on each row has the variation add to cart form. The view's self sorts on the product id to display all the ...
1
vote
1answer
17 views

Drupal Leaflet View loading view block through Ajax

I created a view block for displaying geocodeed nodes on a View Leaflet map. Everything working, the map displays the markers as I want. Now, I would like to load this map throught drupal ajax I ...
0
votes
1answer
19 views

Get Relationship for the Author of the Latest Comment

In a Node view, I am trying to group the latest comments by the author's field_last_name, but I am having difficulty adding this field. I tried using the the "Last comment" and "Last comment author" ...
1
vote
2answers
28 views

How to change view's field (Custom-Text field specifically) value based on other field value using hook_view_pre_render?

I have created a taxonomy-term view. I have added two fields in a view: term-id and custom-text field. I want to check if term-id has children and depending upon the result, I want to set markup ...
-4
votes
1answer
18 views

Article “promoted to front page” also displays all images of featured slideshow [closed]

Currently using Shinbun theme and Drupal 7 (based on an existing site, as required for a project) and was struggling to create a slideshow of selected images, which I finally managed on the article ...
0
votes
1answer
31 views

How to find a field name/column name of a field in database where I have only the label of that field?

I am working on an integration part with drupal framework. Here it's hard to find the table names of the field which is present in the view as I know only the field label name. Is there any way to ...
0
votes
0answers
37 views

Remove duplicate records from view result with pager

My project is setup in Drupal 7 and i am using search API for display my custom search result. Actually i want to show search result based on two content types content so i have configure the search ...