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

Unsupported operand types in View.php [duplicate]

My site has gone done and it says the following The website encountered an unexpected error. Please try again later. I have checked my log files and I've found the following messages in the log [...
0
votes
2answers
27 views

Views image field

I'm trying to add inline styling to my Drupal image using the image field under view. No matter what method I try, nothing is working. I've run out of options. Any help? Below are a few code ...
0
votes
1answer
26 views

Display single field from argument taxonomy term in Views header area

I have a view with a taxonomy term ID in the URL which is used to filter the displayed entities in the view. I want to display the description from the taxonomy term. I've tried this a million ...
1
vote
2answers
96 views

drupalSettings object not showing for anonymous users. core/drupalSettings is added as a library dependency

I'm stumped on this one. I’m having an issue where the drupalSettings object is empty when not logged in. Works fine when I am authenticated. - core/drupalSettings is in theme’s *.libraries.yml file. ...
0
votes
1answer
34 views

Pass argument to view for pager limit

It is possible to pass and argument to a view for the limit on its pager? I see that there is this question for Drupal 7, but not Drupal 8.
0
votes
1answer
23 views

node API hook that can be used to alter fields before loaded by Views?

I need to use a node API hook to alter some node content before it's displayed, in Drupal 7. It just occurred to me though that if I used hook_node_view() it will not effect the output of a View ...
0
votes
1answer
31 views

How to create a view block of one content type filtered by author?

I have a Book Club website which has a page created from a view where different members can add their recommendations. I want to create a block view which can be inserted into a Panel Page for each ...
0
votes
0answers
41 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 ...
0
votes
0answers
10 views

Filtering on the child taxonomy

I have the following taxonomy: Cars -- Jaguar ---- XJ -- Audi -- Nissan Motorbikes -- Honda -- BMW -- Ducati I've created a view with a contextual filter Content: Has taxonomy term ID (with depth) ...
0
votes
0answers
54 views

Contextual filter in media browser view not accessible on autocomplete filter ajax call

I'm having a view which filters Media type and has contextual filter of Entity browser context. This view also has an exposed filter of text box field with autocomplete enabled which filters by media ...
1
vote
0answers
12 views

How do I get Crumbs to use the dynamic title from a view?

I have a view set up with a: Content: Has taxonomy term ID (with depth) When I preview I see the title... However in Crumbs when I go to the DEBUG tab for the view url: How do I get Crumbs to ...
0
votes
1answer
39 views

Linking an action to the button in the view

I'm looking for some tips how to achieve following functionality in Drupal 8. I have a simple view where I list filds, nothing special. One of the fields is a custom text which is rendered as a ...
0
votes
2answers
62 views

How to fetch the content author name with views in twig?

I am unable to fetch the content author name inside the twig template thorough views. Below is what i did so far : - Created a relationship under the advanced tab in views and added the Authored by ...
0
votes
1answer
15 views

How to add a profile cover with a user field image in a view? [closed]

I am trying to add a cover image to user profiles in a block view, the image comes from a user profile field. The problem is that I need the path to that image because my neede code is like this: &...
0
votes
1answer
17 views

Views block template print individual field from content

I created a view of paragraphs and I passed the parent ID as the contextual filter using a relationship to the content that use the field that reference the paragraph. I can see the data been ...
0
votes
0answers
33 views

Filter a view by Date contextual filter not working

I have a content type with 3 fields: title field_a - textfield field_day - Date (Unix timestamp) field with day granularity So, for example, I can have two nodes like this: nid: 1 title: my title ...
0
votes
0answers
20 views

how to fetch content result according to the terms Url alias name?

I have created the vocabulary with name blog category and created terms in the vocabulary like events,News,Category. For the Vocabulary terms name url alias generated in the form https://sitename....
0
votes
1answer
47 views

html.tpl.php for a View (machine_name)?

how can I assign my own html.tpl.php to a view (machine_name) via a preprocess-function (template.php) or a hook? If my view is called "foo_view_machine_name_bla", which contains 50 views-pages with ...
0
votes
0answers
18 views

Slick slider inside custom page created using panels not working as expected

I have created custom page using panels. On that page I am displaying a view using slick carousel. So the slick slider is working perfectly on resize, and when I resize the page to 620px wide the ...
0
votes
1answer
40 views

Add mini pager and infinite scroll to a view

I have a view where at first 1 item has to show. On click of 'load more' next item has to show and so on. For this i have installed 'infinite scroll module' in drupal 8. Now after showing four items, '...
0
votes
1answer
16 views

Is it possible to search content by date in combined field filter views?

Is it possible to search content by date in combined field filter views? I have created a view in which content title ,content body and content date field is showing of node news type,i have added ...
0
votes
1answer
20 views

How to obtain the average of the number of a field according to the term of taxonomy?

I am using the default view Taxonomy term. I added a "number" field to my article content type. I would like to obtain the average of the fields of the nodes listed by term of taxonomy. For ...
0
votes
0answers
19 views

Node not appearing in taxonomy list when taxonomy term is selected within a paragraph

When I had my content type have a taxonomy term field in it, you could select the term and that content would be listed within that taxonomy page. However, due to the need to group that taxonomy field ...
0
votes
0answers
20 views

How to expose the role of an entity reference user?

Using Drupal 8.5.x I have a content type with a list of user as Entity Reference. The reference type is connected to a view. The entity reference lists the selected users, both Primary and Secondary ...
0
votes
0answers
20 views

Attaching JS in form works, CSS not

I am trying to insert a piece of JS and CSS conditionally in a module to customize a view's exposed block. function xxx_form_views_exposed_form_alter(&$form, &$form_state, $form_id) { ...
0
votes
1answer
20 views

Is it possible to replace page arguments with new ones in a view exposed filter?

I'm creating a views filter with the exposed form. After its submitting a new page is loaded with arguments like these (I use the Acquia Dev desktop) http://pal.dd:8083/en/cities?country_id=2&...
0
votes
0answers
30 views

How to use replacement patterns as a CSS class for View?

I am trying to figure out how I can use a replacement pattern in the "Other > CSS Class" setting for a view. For example, I would like the View to contain a css class of classname-[nid] with the Node ...
0
votes
1answer
40 views

How to use views filter on an entity property

I used hook_entity_property_info_alter to add two properties to an existing entity [crm_core_contact]. I find that I can see these two new properties in the "Fields" section of views, and that my ...
0
votes
1answer
35 views

How do I change the Default Query of a Views Exposed Filter with hook_form_alter()?

I searched for an entire day on this issue and found no working solutions that affect the "initial query" of an exposed form in Drupal 7. I have a simple checkbox exposed as a select list; the ...
3
votes
0answers
91 views

How to set the correct RSS row plugin?

I need to add an image to the RSS feed. So I create a new row plugin for the RSS and it extends RssFields row plugin. /** * Renders an RSS item based on fields. * * @ViewsRow( * id = "...
0
votes
1answer
22 views

Create view of child terms below parent term and how many nodes are tagged with those child terms

I have a content type called 'schools' and I have a vocabulary called "destinations" that contains: -USA -- New York -- Miami -UK --London --Manchester I have 2 school nodes that are tagged with "...
0
votes
0answers
22 views

Count how many items were filled in custom composite multiple

I have a webform with custom composite multiple. I need to know how many items user filled while submitting the webform.
1
vote
0answers
20 views

Generating .PDFs from a Drupal View

I'm working on a Drupal 7 Commerce site for a nonprofit and they are interested in generating year-end financial statements for their donors. With https://www.drupal.org/project/views_aggregator, I've ...
1
vote
1answer
48 views

Show full query for anonymous user

I'm currently troubleshooting an issue where anonymous users and certain roles see a different set of results from a view than administrators and roles with more permissions do. The view is supposed ...
1
vote
0answers
26 views

Why methods valueValidate and valueSubmit don't execute?

I'm trying to create a views filter containing an exposed form. The filter class is inherited from FilterPluginBase. In principle, the filter almost works, but I have run into a strange problem. I ...
-1
votes
1answer
30 views

Calculating view field average

I have a custom comment type with a star rating field value. When people create a comment on a node type they can also select a rating. I need to create a way to get an average of the ratings from the ...
0
votes
0answers
10 views

Product Description On Separate Page

Does anyone know how to input text into a field-textarea and have it displayed as a word that's a link. I included a pic to visually show what I'm trying to do. Hopefully you can see the image. ...
0
votes
1answer
29 views

Show English when there is no translation

I have a website for a client, with more than 5 languages (bg, en, ru, ch, de, it ...). The client wants to add a news section but the news should be only in en or ch and if the user selects a ...
0
votes
3answers
37 views

Create a Term Queue on views

I have a views showing some selected terms of a vocabulary. The Views block is created using Taxonomy Terms as content(show). It showing order by the terms tree. But my client want to sort it as their ...
0
votes
2answers
30 views

View to show 2 different fields that have multiple values next to each other

I have a content type that has 2 fields on it: image (multiple values) image description (multiple values) I have 6 images and 6 descriptions. I want to use a view to show each image with each ...
0
votes
1answer
68 views

Rewriting the output of a file download field

I have a content type with two fields, one pdf field which will be downloaded using the Download File module which provides a formatter (file download) to automatically download the pdf file with one ...
-2
votes
1answer
24 views

How to display a vocabulary term list with node count?

How can you display a vocabulary term list with node count? I have a vocabulary named books authors, I want to display a list of the terms which includes the total number of nodes next to each term. ...
1
vote
1answer
101 views

how to make a custom exposed filter for SOLR view with hook_views_data_alter

I need to make a custom exposed filter for a view , and I found an example that does it for nodes, but the filter does not show up for my view which is using SOLR so it has 'content datasource' ...
0
votes
0answers
25 views

user list referenced by paragraph item

I want to list teachers(users) based on lesson term which are used in paragraph bundle. User list will be on path .../path/% For example .../lesson/math Path page will show math teachers. What I ...
0
votes
1answer
30 views

How can I add multiple conditions for the same field taxonomy term in views query?

I make some query for views filter for nodes. Use in hook_views_query_alter. $definition = [ 'table' => 'node__field_characs', 'field' => 'field_characs_target_id', 'left_table' => '...
0
votes
1answer
30 views

How to show all nodes and comments by a user in a single view?

I am using Drupal 8 in combination with the Forum module, and I'd like to show all comments and nodes by a user on his profile page, in a single view. I can't find a way to get this to work, because ...
0
votes
0answers
19 views

Handling blank values in multi-value field

I have a multi-value field that is exposed to users for input. Sometimes they click on add another item when they don't have one. So some of the values in the multi-value field are blank. How would I ...
0
votes
0answers
22 views

is there any way to decrease memory usage of Drush exporting views? [duplicate]

everyone! I've found an interesting issue with views. I use views bulk operations module and vbo_export modules to export views to excel file using Drush. And I found that it's using a lot of memory, ...
0
votes
1answer
20 views

Create entity view block

I have 2 content types: schools and courses. On the schools content type, I created a field called 'Courses At This School' which is an entity reference field to the courses content type. So, I edit ...
0
votes
0answers
111 views

Get Current User in Views

So I am building a website (of course using drupal), and have a table in views. Now, I also have installed on the website Views PHP. In this table, I have a names column. In the Names column in views, ...