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.

4
votes
0answers
44 views

How to get a second join into hook_views_data?

I am trying to make the value of a string (name) found in mymodule_names.name available to Views by means of hook_views_data(). To get the name, I need to first look up the nid of the node I want ...
4
votes
0answers
134 views

How to render a @FormElement in Views area plugin

I am doing a custom plugin area for displaying some data in a views footer (Drupal 8). I do something about just like this : Create a custom area plugin The only point is, instead of #markup in the ...
4
votes
0answers
527 views

How do I remove JOIN in hook_views_query_alter()?

I have a view with two filters (A + B). Filter B should only be included in the query, if a specific value in filter A is set (like a "conditional filter"). So I tried to remove the where condition ...
4
votes
0answers
755 views

How to create a Draft view with Content Moderation?

In Drupal 7 with Workbench Moderation is easy to create a view to show the last Draft of a content: You have a relation in the view named Workbench Moderation: Node, so using the filter Workbench ...
4
votes
0answers
272 views

Views doesn't like multiple entity references in my entity

I have a couple of custom entities defined by my module against plain tables in my database (because I have a lot of data and don't want to unpack it all into fields). My contact entity has a ...
4
votes
0answers
1k views

View for Taxonomy terms?

How can I output nodes which linked with taxonomy term through a view? How can I link taxonomy vocabulary with a view wich will output appropriate nodes for each term of this vocabulary? In Drupal 7 ...
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 = "...
3
votes
0answers
41 views

How to use Context with Views' Contextual Filters in D8?

I have content type City. I have a view page with contextual filters to show the cities at the URL pattern locations/<city id>. I want to use Context to add blocks to these cities pages but I ...
3
votes
0answers
1k views

Drupal 8 creating a custom Views filter plugin

I am trying to create a custom Views filter plugin. Basically it should read the current path, check the relevant path field in the node (defined as text-field) and get that content. I'm stuck around ...
3
votes
0answers
186 views

Creating a view by comparing two fields of two different content types using the same taxonomy

I'm trying to create a view to desplay contents based on shared taxonomy terms. More concretely, I have two content types: Offers (with field "Category") Needs (with field "Category") This ...
3
votes
0answers
779 views

Related content in D8 Views using entity reference

I've browsed through (and tested) every solution I could find here to this seemingly simple challenge. I've got multiple content types (fx. News, Releases, Events, Videos etc.) that are referencing ...
3
votes
0answers
137 views

Date filter GRANULARITY for Search API VIEWS

I am working on Search API view. There is a Date Exposed filter. The requirement is we have to filter based on Month-Year instead of Day-Month-Year. But there is no Granularity option to select for ...
3
votes
0answers
170 views

How to hide a menu item of a view for an administrator?

I have created a view with Views and restricted the access by Role. I also created a menu with the view, and I didn't select the Administrator role to be included (so Administrator role does not have ...
3
votes
0answers
113 views

“Hide if empty” does not work in Views if 'Show prefix and suffix' is enabled

I have a price field that I need to hide if the value is 0. As I want to use :- as a suffix I turn on "Show prefix and suffix". Unfortunately this makes the field visible again. In my different views ...
3
votes
0answers
111 views

Why does getActiveTrailIds() return nothing for view pages?

MenuActiveTrail::getActiveTrailIds, though it works consistently for node pages on a menu, doesn't return anything for Views that appear on the menu in exactly the same way. See this demo site which (...
3
votes
0answers
62 views

Why Each user can modify flag field of other users by VBO(Views Bulk Operation)?

I have many users, and I have a flag and also flag field. users can flag contents and add value in flag field when they are flagging a content. for modifying flag field I'm using VBO Module. But each ...
3
votes
0answers
160 views

Convert View Pane Display to a Block Display

I have a View with a Pane Display. However, for the page I want to place it on, it turns out that I need a Block Display instead of a Pane. How do clone or convert that Pane Display to a Block Display?...
3
votes
0answers
328 views

View exposed filter block no alter form with ajax

I am trying to filter out the no results items in my exposed filters. (I know i can use selective filters, but in this case i can't use them). So i alter the filters with form_alter, check which ...
3
votes
0answers
60 views

Views Grouping by Taxonomy Parent of a Parent

I'm working with Views to build a display that groups by "Categories" - see the example- in a vocabulary. I had that working just fine when the vocabulary only went one level deep. Now what I need to ...
3
votes
0answers
654 views

Show nodes of other content type that share a common term (with depth)

I have two content types: sector and product. Both share terms from the same vocabulary, called branch. A sector node should list all product nodes that share the same term(s) (from the branch ...
3
votes
0answers
31 views

Filter Criteria problem with condition

I have one view and need to filter from more than one content type and condition. But I can only use only one group, if I create more group, the content can not be selected. please kindly answer my ...
3
votes
0answers
187 views

How to use Views contextual filters with a hierarchical taxonomy path in the URL

If I have a multi-level taxonomy, and the URL for each Term contains information about its parents in each URL component, how can I set up a View to show the content for each Term? Example of the ...
3
votes
0answers
290 views

Get Location module Block : how to show map markers for particular taxonomy term - exposed to user

I am using the Get Location module for building store locator functionality in my site. I have made a content type with field = address and field type = Geolocations Fields with widget = Geocoder. I ...
3
votes
0answers
1k views

Search excerpt with Search API (rendered HTML)

Is it possible to create a search excerpt from the Entity HTML Output (with Search API)? What I did: Activated highlighting and "create excerpt" within my Search index. Added "complete entity view" ...
3
votes
0answers
196 views

How to ajax refresh one row in a view

Views are often used to modify entities (for example tasks and their status or priorities) and when a field is changed using an ajax button, a page or view refresh is required to update the rest (like ...
3
votes
0answers
199 views

How to create a composite filter that allows multiple selections?

I am using composite views filters in my exposed filters. I have defined my groups in the composite filter as follows: ab = a OR b cd = c OR d ef = e OR f However, I only seem to be able to display ...
3
votes
0answers
74 views

Display all terms in the same lineage when user can save only the deepest level

I'm using D7. I have a vocaburaly. User are enforced to save the deepest term in the vocaburaly with SHS(Simple Hierarchical Select). And, by the setting of SHS, user can save only a term on the ...
3
votes
0answers
376 views

Use text field as contextual filter in views? Or related content not based on taxonomy

I'm trying to figure out if it would be possible to use text field as contextual filter in views? Say I want to have EVA or block that takes certain Field-A from current node as filter. Then EVA or ...
3
votes
0answers
199 views

Rewrite exposed filter input from url

I have created a view to list nodes path articlesearch. Now i want to filter the content with a search string based on title, body and taxonomy term with OR condition One issue i am facing is i want ...
3
votes
0answers
194 views

How do I prevent D7 exposed filter on end date from reverting to start date if no end date has been entered?

I have a "membership date" field with an optional enddate and want to create a view showing membership list at a selected date (exposed filter). The basic logic is clear: nodes should appear in the ...
3
votes
0answers
835 views

Meaning and Purpose of Global:NULL in views contextual filters

I have been researching using of multiple parameters in a view used as contextual filters like category/1/10/15/11 etc, if all the parameters are present, it works fine, but what if some parameter ...
3
votes
0answers
192 views

How do you add the NID as a view filter criteria and not contextual filter?

I'm using an Entity Reference field, displayed as a View, to select an "Work Entry" node type. The Work Entry nodes are selected when creating/editing an "Invoice" content type. So the user will be ...
3
votes
0answers
218 views

Drupal 7 AJAX error when running batch with Internet Explorer

I'm getting an AJAX error when running any batch with Internet Explorer 8, 9 and 10. This error occures when I'm using "feeds" module, "views send" module or when I delete a user. For example, when ...
3
votes
0answers
630 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="...
3
votes
0answers
368 views

Views PHP - Filter by field on node authored by current user

On my D7 site, when a user creates an account, a single node of a particular type (TYPE A PROFILE) is created for them, and they then edit it and complete a 'Minimum acceptable value' field. There ...
3
votes
0answers
204 views

Is there a way to use tokens in a Views: Link Display setting?

This question pertains to Drupal 7 and Views 3 (specifically 7.23 and Views 7.x-3.7): Is there a way to enable the use of custom tokens within Drupal Views Link Display settings? My use case is a ...
3
votes
0answers
318 views

Creating a custom views filter handler with a non-sql query

So, I'm working on a custom views handler that will allow users to filter based on field comparisons. I've overridden the operator to use my own function defined elsewhere in the module that ...
3
votes
0answers
125 views

Related terms summary views block

I have a content type with two fields for two different taxonomy vocabularies (Section & Extras). "Section" only have one value, while "Extras" can have multiple values. I created a block using ...
3
votes
0answers
1k views

Contextual filter based on translated term

I'm looking two days for the right answer but can't find it anywhere. Here is my issue: I'm using Drupal 7.21 with Entity Translation to build a multilangual site (English and Dutch). English is the ...
3
votes
0answers
784 views

Multiple Select Listbox Views Filter Drupal 7

I have a view with some fields in place for instance one field is a product name. I want to make a multi-select listbox that will allow for selecting 3 of them from the list of products that's a field ...
3
votes
0answers
144 views

How do I ensure active menu items are highlighted for Views with Better Exposed Filter arguments

I'm using Better Exposed Filters on a clothing site. There are various types of products listed using Better Exposed Filters (to choose between Mens/Womens/Kids). The Mens and Womens pages are ...
3
votes
0answers
312 views

searching on List (integer) field for values greater than than selection (drupal 7)

i'm working on a site for a real estate company which involves a search form. i've got a view set up called search results and have set an exposed form (form in block) with a field to search Number ...
3
votes
0answers
182 views

Filter completed events by using end time filter (greater than or equal to 'now')

I'm almost done with integrating the Fullcalendar module into my website, but I am concerned about the loading time. I have about 200 events, and getting even more which are repeated daily, weekly, ...
3
votes
0answers
3k views

Drupal 7 Views : Filter Event : only show events when start date <= start date + 3 weeks

I have a list of Upcoming Events that shows all events in chronological order starting with Today. Most events last only a week or two at most, but we also have exhibitions that run for 3-4 months. ...
3
votes
0answers
2k views

Views “Content: Title” as a select list exposed filter?

Now I know how to display the "Content: Title" exposed filter field as an autocomplete widget, but can I output this field as a select list too? Are there any modules to do that? (I know this can be ...
3
votes
0answers
311 views

Creating anchors using views glossary

I have a list of nodes that are tagged with taxonomy terms. I have a view that groups the nodes by their terms and shows them all on one page. I know that glossary mode with an attachment is a great ...
3
votes
0answers
2k views

Views AJAX pager is not working for custom theme

I am using a custom theme for my Drupal site. Here I have created views with page displays, Kept AJAX pager 'on'. When I click on next the pager keeps on loading. In firebug I found the following ...
3
votes
0answers
330 views

D7 | views filter to show current user nodes or all nodes if admin

I have a site with multiple roles: admin editor1 editor2 editor3 … I would like to be able to show a node reference drop down menu to only show current users's nodes. So each user can only node-ref ...
3
votes
0answers
2k views

Extend Search API: Create and expose custom sort/filter from db_table

I have a geocoded field for each node of a certain type. It simply geocoded the address filled in the node create form. I've multiple views based on the search api (database not solr) and use facets ...
3
votes
0answers
1k views

Fields with Multiple Entries in Views w/ External Data Source

I'm on drupal 7.9 and I'm using the Views 3 rc1. I've successfully created a custom base table that draws data from an external database (a drupal 6 site's database). Here's that code: <?php ...