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
613 views

Menu Block won't display when a page has a View Block on it

I have Menu Block installed to provide some contextual menus for certain areas of a site. These generally work great. But I have a few pages where I'm adding a Views generated block to the bottom of ...
0
votes
1answer
707 views

How to override views-view-field.tpl.php in custom module?

I am trying to override views-view-field.tpl.php in my custom module as suggested in override views-view-fields.tpl.php in custom module but looks like it's syntaxes are old. My codes are like: In ...
0
votes
1answer
561 views

Redirect a view page to another view page with arguments in the url

I have a custom view with button in the main tab placed in the local_task tab bar area (Outcomes). I have sub local_task navigation items under that as well that are regular drupal views. (See below) ...
2
votes
1answer
975 views

When do hook_views_data() and hook_views_data_alter() get called?

I'm working on a site I inherited that has a functioning hook_views_data_alter() implementation. I can see things in the Views editor that it has added. However, I cannot figure out how on earth to ...
0
votes
2answers
65 views

Perform math calculation in views

On Drupal 8 site, I have a exact copy of the below excel example table made with views but without the yellow cell yet. The view is displaying one content type: Client where all the below fields are ...
1
vote
1answer
594 views

How do I use an external data source in a view?

I am trying to display some TV schedule information from a thirdparty json api. I need to know what is the best way to do this. I have tried various module wsclient module,json query plugin, wsclient ...
0
votes
0answers
13 views

How to decode Chinese characters in while exporting to CSV from views data export module?

I have used Views Data Export module for CSV exporting in views. It works fine but its not able to decode non-latin languages. I didn't find any configuration also in views data export settings. Only ...
1
vote
2answers
936 views

Views contextual filter - Contains search with taxonomy field

I am searching with taxonomy terms, is there a way to do the search with anything that contains what i am searching for will be returned? For example if i search Amer nothing will return, but i ...
2
votes
1answer
637 views

How do I change the ID of a copy of an exposed filter?

I'm using answers from Expose a view's filters both in a block, and in the actual view to duplicate an exposed filter as a block and make it appear in another region on every page. I want to ...
0
votes
1answer
871 views

How do I loop over result rows and return calculated values?

I cannot get proper results from View PHP field. I've set up a Flipped Table view of entity form submission of which I'm trying to calculate "results" (sum and count(for avg)) with following code $...
0
votes
1answer
9 views

Views date exposed filter by year in checkboxes

I have date field. In views I want to add the a date exposed filter. This filter will only display year and we can select multiple years. Just like this I have checked the better exposed filter ...
1
vote
1answer
394 views

Passing values to a view block

I have a page that contains 4 separate blocks, from the same view, Items block 1 - this contains a list of item titles Items block 2 - this contains a different list of item titles Content block 3 ...
0
votes
1answer
620 views

Glossary view: Show all results separated by letter

I have a glossary view set up. When I go to example.com/glossary/all, all of my results are shown, but I'd like them to be separated by letter. The layout I'm looking for is exactly like this... ...
1
vote
1answer
387 views

How can I display multiple images of single image field each in a different row?

I need to render multiple images that belongs to single image field, each on its own views row. While on a view single field setting, inside "Multiple field settings", uncheck " "Display all values ...
0
votes
0answers
8 views

How can I suppress blank address fields in Global Custom Text?

I am using the field_address in my content type (for a Resource Guide record), and in the view I have created it accesses the individual Address:xxxxxx_fields (Address(field_address:xxxxxx_fields))(...
0
votes
1answer
11 views

how to stop a view from executing within a views hook

I am using custom code with a views pre_execute and i want the view to return an empty set if certain conditions are met , or not to return the view at all. how can i do this ? this is what i tried. ...
0
votes
1answer
21 views

How do I pass the UID in URL to embedded View?

Probably a stupid question, but I'm stumped... I have a simple View which lists all terms from a Taxonomy. Within this is a Global Field Type of "View" which is trying to list any content related to ...
1
vote
1answer
384 views

How can we apply group_concat using views?

Is there any way we can apply group_concat clause using views and without applying any customization to views ?
0
votes
6answers
10k views

How to set the default value of an exposed filter rather than -Any-?

I have a view with exposed filters in Drupal 7 and I need to set the default value of a filter to current year. I also need to unset/remove the - Any - option from the select list.
-3
votes
0answers
15 views

Infinite scroll on view shows title again

I have a view / display of type page and show 6 items. I set a title and this title is shown on top of the page. When I load more items there is the title again, above the next 6 items. How to ...
0
votes
0answers
23 views

“Views Contextual Filters OR” only works if user has permissions to “Administer products” [closed]

I'm building a Drupal 8 commerce page and have a view to show content related to taxonomy terms of multiple vocabularies. Unfortunately there's no contextual filter "has taxonomy term id" like for ...
-3
votes
1answer
36 views

How to change a view field programatically

I want to change the result of a view field in a custom module.I’m not sure which of the hooks to use for this there are not a lot of examples of how to use the views hooks for d8
0
votes
1answer
9 views

How to programatically change a view's style_options when user clicking the exposed filter apply button?

In a Leaflet Map view, the exposed filter is a list(text) field. On user clicking the Apply button of the exposed filter form, I need to programatically change the value of $handler->display->...
1
vote
2answers
609 views

Dynamic menu item based on Views argument

Is it possible to have a dynamic title on the menu item based on the argument that Views is receiving? I'm using the title on the menu item on the breadcrumb and my breadcrumb changes based on the ...
0
votes
0answers
9 views

Setting a Default Value for Exposed View Filter

I have a view with a numeric field. I'm using Better Exposed Filters and the jQuery UI slider that comes with it. The value is filtering for "less than or equal." The default value automatically ...
0
votes
1answer
9 views

How to show snippet of an event when clicked in the calendar in Drupal 7 with the Calendar Module

I created a calendar with the Calendar Module, but I don't know what to do to show a snippet of the event when clicked. This calender is a perfect example of what I mean https://hutchinscenter.fas....
0
votes
1answer
19 views

Rewrite results output creates 2 links for one for one rewritten custom text field

I am using replacement patterns to rewrite the results of my content title field with the manufacturers name in front of the title. I am using the following custom text within the title field to ...
0
votes
0answers
10 views

How can I allow only one flag per matching field value within a view?

I have a view that allows users to flag nodes directly through the view, I'd like to limit it so that can only flag one item per category at a time. For example: VIEW Category 1 Node A ...
0
votes
1answer
19 views

How can I repeat parent table field only once for a group of child table fields?

I am using Drupal Views module. I have Student accounts table that can have multiple students in it. Is there a way to create a table like the following? ╔════╦═════════════╦═════════════╦═══════╦════...
0
votes
1answer
762 views

View block pager not working

I have the following view what also is rendered as a block. This view has a mini pager with default 3 items to show. When i check configuration of the block of this view it looks like this : I ...
1
vote
1answer
35 views

How to make rows of views blocks on a basic page via the Layout Builder, reacting collectively to an exposed filter?

I have to make a page, containing 3 rows with 3 blocks with content teasers. Preferably the page layout should be made through a basic page content type item, through the Layout Builder, so it is easy ...
0
votes
2answers
886 views

How do I display taxonomy child terms?

I used the Taxonomy View Depth module to create a taxonomy vocabulary like this. Animal Cats Brown white Dogs Brown White What I did was enabling the default taxonomy view, and changing the ...
0
votes
0answers
15 views

How can I have facet items set to disabled instead of hidden if no results?

We currently have a Views page with Search API and Elastic Search. There are 3 facets available: Category (radio, single selection) Range (checkbox, multiple select allowed) Type (checkbox, ...
0
votes
1answer
354 views

“Image Upload Button” section remove after click on upload

I am trying to edit users's profile page in Drupal 7. I have an image upload button there, but it remove (hide) after click on upload button . But If i login with admin its working fine, means image ...
0
votes
1answer
15 views

Filter a view based on current user's roles (D8)

Using Drupal 8 Views, I'm using a view to populate an Entity reference field on a profile. (So it's a view of "Entity Reference" display type.) I want to filter this view to show (and allow users to ...
1
vote
2answers
667 views

Encoding and decoding in Views

I have a view that accepts a contexual filter.When I pass a value through contextual filter like view/sometext ,it is passed directly without encoding.I need to encode it in the url and decode it ...
0
votes
1answer
31 views

In Views, display additional fields from an entity reference

I have a content type with a field that is an entity reference to another content type called "URLs", and the "Allowed number of values" is set to "Unlimited", meaning that one record can have ...
0
votes
0answers
31 views

Views paragraph fields in block Twig template

I understand that I can use content['#view'].field['field_name'].value(rowcount) to get a value of a field. But how can I refer to fields of a paragraph field, that is in a view block in a file like "...
-1
votes
1answer
250 views

Filter Views based on Webform Submission Data and Current User Email

I've got a webform that collects an email address. What I want to do is build a view based on that email address and the email address of the current user that is logged in. Basically, show all the ...
0
votes
0answers
27 views

When changing values in the database why does this not affect the view?

edit: How could i use Views bulk operations for the change of a field's value? Instead of directly editing mysql? I have a content type, f.e mycontentype, which has titles, like: Title - library1 ...
1
vote
2answers
705 views

View Group By field with mult-value field

I have a field that contains multiple boolean values ( similar to a tag or taxonomy term) which indicates status. So the field is like this. application="received, data complete, references, ...
0
votes
1answer
708 views

How to Center Image in View Slideshow

I can't get the views slideshow to center in the div. I tried the following code but with issue: #views_slideshow_cycle_main_content_slideshow-block { width: 100%; text-align: center; } #...
2
votes
1answer
759 views

Views with exposed filters WITHOUT `Use Ajax`?

Is there a way to use exposed filters, but not require Use Ajax ? I want exposed filters but I want it to submit the form and refresh the page.
6
votes
3answers
669 views

Why Content Path cannot be used to sort a view?

Using Views with Drupal 7, how can I use the content path to sort a result table? I have node title, created date and path as fields for a view. The first two fields have the checkbox to make them ...
0
votes
1answer
36 views

views_pre_render add class item to a row

When pre-rendering a view row is there a way to add an HTML class into a single row of the markup, allowing me to add a new background colour to the event item highlighting its importance? This is for ...
0
votes
0answers
13 views

Views deleted after changing the content field

It happened three times so far. After deleting some field and replacing them with other in a content type some pages are missing or restarting. Of course deleted field were used on that deleted pages....
0
votes
0answers
9 views

Default contextual filter to current user but prevent altering the value in the URL

So I have the following content types: User: The default drupal user Document: Title Body ... Linked User: Entity reference (User) Please note that the Linked User does not reference the Author of ...
2
votes
1answer
593 views

Term lineage in simple Hierarchical select module

I'm working on a project using Drupal 7. I'm using simple Hierarchical select module. How its possible to attach the parent lineage to the node? Is there any way to do so using simple Hierarchical ...
0
votes
0answers
13 views

Delete a content type's allowed values, and all parent nodes should not show info regarding these values

I have a content type f.e. parts, with the following values: electrical, machine, glass, liquid or NONE I also have a content type, f.e. product, where with a view one can select which part the ...
0
votes
1answer
609 views

Add all the fields to view automatically in csv export

I am using entity registration module for node registration.Now i wants to export the registrants. I am using view export module to export registrants list. Its working fine But as the registration ...