Questions tagged [views]

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

Filter by
Sorted by
Tagged with
2 votes
4 answers
1k views

How to remove unwanted div from view rendered block?

In D8 I've created a view and assigned it into a block, I've created corresponding template for both view and block. Most of the unwanted addition of div's and classes has been removed. But the ...
0 votes
2 answers
1k views

How do I enable aggregation in the settings?

I have the same problem as in Views sorting by number of values in field". I would really like to try the solution that is given. How can I enable aggregation in the view settings? I can't find it ...
0 votes
1 answer
438 views

How do I get an OG Group Menu block to appear in View?

Running Drupal 7 with OG 7.x-2.3 and OG Menu 7.x-3.0-rc4. I have added a view to a Group Menu that lists all content in the group. All I want is for the group menu block to display when the view is ...
0 votes
1 answer
425 views

template.php hook to add variable to view

I'm trying to include the total count of a given node type into a view tpl.php file. I would like to set this variable in the template.php file, so that it is available in the tpl.php file (that way I ...
0 votes
1 answer
418 views

Figuring out a conditional statement for a specific page

I have a view which is modified by a views template page - this is in Drupal 6. I'm trying to figure out a condition to affect the layout. Currently, the element seems to be generated in page.tpl....
0 votes
1 answer
596 views

Multiple pagers in one page

I have a view with two separate displays that is used in one single page. Both the displays are using a pager. To get things working I set a unique id for each pager under pager options. This works ...
1 vote
1 answer
403 views

Need of re-indexing on search on Drupal site?

My client site has a table whose data is coming from Indexed view, sometimes updates made to the data wont reflect in the view table. Elysia cron is installed and up running, which should update the ...
0 votes
0 answers
28 views

Why is my custom block name not being generated?

I created a custom block called "Heading, Body, and Link" and the name being suggested for the Twig template in the source code is block--block-content--72dacf39-0242-4eaa-9226-171add6f87d2....
0 votes
1 answer
864 views

Filter based on the current node field value

I have a Webform where it's used to get product comments. This webform is exposed in a node page and has a field that is populated automatically with a value from the current node, lets say "...
0 votes
1 answer
557 views

How do I get the entity ID from a view row and pass it along to the item list template?

I have a view which returns rows of entities. Each entity has several multi-value fields. The structure is kinda like this: Field 1: Item A Item B Item C ... Item H Field 2: Item A Item B Item C ...
0 votes
1 answer
414 views

Endpoint services with url alias name

Is it possible the to view xml/json format data with url alias name instead of endpoint_path/node/1 or endpoint_path/node/2
0 votes
1 answer
447 views

Fielded Relation's Field not showing in Views

I'm trying to implement a "rating" system with Relation module. I have a Relation Type defined from a user --> node. The Relation Type has an Integer field to hold the rating. I want to produce a ...
0 votes
2 answers
679 views

How to hide nodes in a VIEW where the user is not referenced?

This is a follow-up to How to show nodes where the user is (not) in the reference field with Views? I have a node with multiple user references and need a node VIEW that hides all nodes where the ...
1 vote
1 answer
2k views

How do I set up a More Link in a View's Pager?

I have a View and am using the Pager to display a specific number of items, limited to 4. I want to create a "More" link to link to the rest of the items. I've set my view up as such: But no More ...
3 votes
1 answer
571 views

Views Grouping field:Add Ordered class to Grouping row

I use Views and Grouping field to integrate my data. But i need each grouping row ordered. I want to override the views-view-grouping.tpl.php, and change the "view-grouping" class to "view-grouping-1"...
0 votes
2 answers
423 views

Views partial Contextual Filter on username

I have a view of users with a contextual filter for username which works great for whole usernames, but I need to allow this to work with partial names, or specifically whole words (userames are full ...
0 votes
1 answer
477 views

What configuration is required to use date_views with a field?

I have a custom entity "referral" which is available for views: function mymodule_entity_info() { return array( 'referral' => array( 'label' => t('Referral'), 'controller ...
1 vote
2 answers
1k views

"Allow multiple selection" not available in exposed filters

I'm having trouble making some options appear as checkboxes in an exposed view form. The problem is that the "Allow multiple selection" option is not available in the filter. How can i make it ...
0 votes
1 answer
456 views

Average value of integer field using views

I set up a multi value cck integer field for rating purposes. It has values 1|good 2|bad 3|dont know Users voted like so: 3 votes for good 2 votes for bad 4 votes for dont know I want to make ...
2 votes
1 answer
681 views

How to group-by fields in view AND control output via template file

I 'm hitting a brick wall on this one, so trying to reach out for help. I did try to research this but could not find anything helpful. What I have: I have a content type of 'courses', which have ...
2 votes
1 answer
464 views

Use a field's values in database to populate an exposed filter's options

I have a content type with a field named year (integer). In a view, I'd like to expose this field to the user as a filter. Instead of the default text boxes, I want to populate select lists with the ...
4 votes
2 answers
3k views

How can I create an image gallery?

Currently I am running in D7 with the following modules: Media 7.x-2.0 Views 7.x-3.7 Colorbox 7.x-2.4 I am trying to create an image gallery using these modules with the following steps. Please ...
0 votes
1 answer
795 views

How to filter Search API index view by taxonomy parent

I am using the default database server that comes with search api. I have the Hierarchy Index ticked and I also have the taxonomy field that I want selected. Could someone give me instructions on how ...
0 votes
1 answer
221 views

Table view: "Hide Empty Column" checkbox doesn't seem to work

I've created a view, formatted as a table. I'm trying to hide empty columns – so, in the table settings, I've checked the "Hide Empty Column" checkbox for most of the table columns. However, this ...
-2 votes
0 answers
22 views

How to fix "missing schema" errors, which are reported by "Configuration inspector" module?

I have just installed the module "Configuration inspector". When I call "/admin/reports/config-inspector" I see many errors, mostly "missing schema". How can I safely fix ...
1 vote
1 answer
667 views

block view is not displaying

This problem starts with the subtheme. I am using drupal 7 with a subtheme based on omega 3.1. For some reason node title and admin tabs are displaying only on the home page and two basic pages, ...
1 vote
2 answers
1k views

How does one add a Total(s) row to Views results?

After doing some research, it seems like the best way to get a Total(s) row added to a Views table is via the Views Aggregator Plus module. (Is there an easier/better way?) As can be seen below, I'm ...
4 votes
1 answer
930 views

How to use url alias in views for taxonomy terms?

On a Drupal 7 site with pathauto installed I'm using a view to show all taxonomy terms of a given node. The terms are linked to the term's page. The problem is, that the path of those terms does not ...
0 votes
1 answer
723 views

Views Bulk Operations Checkboxes check on click

I do search for a specific option in bulk operations. For now, when I click somewhere in my row, the checkbox for the bulk operation gets selected, but I want a user to directly click on the checkbox. ...
0 votes
1 answer
713 views

View that shows all children content of parent

Been searching and cannot find this anywhere for Drupal 8. Very basic view request, can't figure out why it's not straightforward. I want a View that shows Parent content and under it all Children ...
0 votes
1 answer
2k views

How come my view block is not loading using ajax?

We have a view, myview, that has an exposed filter title (text input). The view has Exposed form in block:Yes and so we load it onto the page under admin/structure/block. The block has a machine name ...
0 votes
1 answer
947 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' => '...
1 vote
1 answer
499 views

Is there a way to set two separate views with exposed filters in a panel page?

I have been attempting to create a panel page with two columns, one to display view1 and the other view2. The intent is to have the user choose a content type in each column using exposed filters and ...
1 vote
1 answer
1k views

Filter views for same taxonomy term

I am using D8. I have two views (articles and videos) sharing the same taxonomy (segments). How can I filter the views based on the view type? For example, if I am on the articles page, I would need ...
0 votes
1 answer
2k views

Pre-populate an Entity Reference when Adding a Node : Based on URL Alias

I am trying to pre-populate an entity reference with a specific game node, when a profile node is added; based on URL of the game the add button is on. The game node I want to reference in profile ...
0 votes
1 answer
703 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... ...
2 votes
1 answer
2k views

How do you join a custom table to a node from a field with hook_views_data()

I have a custom table that contains (for simplicity) two fields: id client_id On my node content type, I have an integer type field called: field_dashboard_id. All my nodes have the ...
2 votes
2 answers
2k views

Cannot add CSS class to views field

I have a view in Drupal 8, and have configured a field in the view to have a custom CSS class. The field I am adding the class to is an image. Under Style Settings I have chosen "Customize field HTML"...
0 votes
2 answers
731 views

How to alter output of markup on a specific views field

Is there a way to change the output programatically on a specific field in d8 views? I have a field called 'IMCID' which I want to output as a link, but the link is going to change based on the value ...
1 vote
1 answer
467 views

Views, Taxonomy, multiple parameters using contextual filters

A view has been created to display related content types via their taxonomy terms, using contextual filters. Currently the view is able to display content based on the first param eg. about The goal ...
6 votes
4 answers
9k views

HTML isn't rendering, HTML tags are being printed

I added a view template views-view-fields--nieuws--page.html.twig to my theme. The template is correct, when I edit it I see the results on my website. {% for field in fields %} {{ field....
0 votes
1 answer
62 views

Expose taxonomy term contextual filter in Layout Builder

I have created a view block for a content type of card. The card content type also has a taxonomy vocabulary where users can add new terms to that taxonomy vocabulary. I have a contextual filter on ...
18 votes
3 answers
15k views

Date popup in exposed filter

I'm using Drupal 7 with views 3. I have used an exposed filter for a date field and I want to provide option to choose date from datepopup for date filter? How can I do this?
1 vote
1 answer
659 views

Why my query string generates page not found for my view?

In Drupal 7 I'm using a view export to download information for my orders. If i go to the default url /admin/commerce/orders then the page downloads correctly. However, I also have some filters so I ...
1 vote
1 answer
1k views

Dynamic filters based on another filter

I am looking to create something similar to this http://www.smartoplug.com/partsearch I need my view to sort based off of multiple parameters. So if you select ford in the make, the models dynamically ...
0 votes
1 answer
432 views

Custom views filter to select roles

I have scoured the internet trying to find information on how to achieve this functionality to no avail. I am hoping I can get an answer here. I have a content type called 'Server' on my website. ...
1 vote
1 answer
1k views

Broken/missing handler error for my custom views filter?

I am trying to write a custom filter for views. The goal is to filter by alias, but that's not important now. It seems like I am missing a step to get view to recognize my filter hander after adding ...
0 votes
2 answers
677 views

Change output of a field with PHP field?

I'm constructing a view in Drupal 7 with a field called "Content: Fruit". If the value of that field is "lemon", I want to change the output to "citrus". How can I accomplish this? Here's what I ...
0 votes
1 answer
809 views

Accessing Content: Path field within views_view_unformatted TWIG template

I have a view that has the fields: Content: ID, Content: Title and Content: Path. In my views-view-module.html.twig file I can access the fields via the following: {{ item['#row']._entity.id }} {{ ...
3 votes
1 answer
962 views

how to change the size of an exposed filter autocomplete form?

the source shows: <input id="edit-field-location-taxonomize-terms-tid" class="form-text form-autocomplete ctools-auto-submit-processed" type="text" maxlength="128" size="60" value="Germany" name="...

1
2 3 4 5
304