All Questions
4,470 questions
12
votes
3
answers
10k
views
Views Page not showing pager
I've got a Views Page showing Article teasers. There are lots of Articles in the db and I'm only showing 5 per page in the View, but the Pager is not showing up at all. Here is my Views configuration, ...
12
votes
1
answer
5k
views
Views 3 doesn't recognize a declared handler. Why not?
In modules/addressfield/addressfield.module I have:
/**
* Implements hook_views_api().
*/
function addressfield_views_api() {
return array(
'api' => 3,
'path' => drupal_get_path('...
12
votes
7
answers
13k
views
Why `GROUP BY` in hook_views_query_alter() doesn't work?
I'm using Views 7.x-3.6 and I tried altering the GROUP BY clause with hook_views_query_alter() as below:
function mymodule_views_query_alter(&$view, &$query) {
if ($view->name == "...
12
votes
6
answers
5k
views
How to restrict direct access to the nodes?
How to restrict direct access to the nodes but just allow views to access the required field of the particular node type?
For example in Views Slideshow we are sliding the image field that belongs to ...
12
votes
3
answers
5k
views
Filtering a view by a checkbox field
My site has a node type called "Resource". This node type has a field called "Reviewed"; this field is a single on-off checkbox:
I've created a view that lists all of the nodes of node-type "Resource"...
12
votes
3
answers
8k
views
What is the difference between an 'Attachment display' and a 'Global: View area' put into header/footer of a view?
I'm trying to decide which should I use. Both can inherit contextual filters, so in my case both of them are good solutions. Except that I already have the other view that I want to put together with ...
11
votes
5
answers
25k
views
hook_preprocess_page(): how to tell a views page?
Im writing a custom module that need to insert some javascript and css files only in a Views page.
Im using hook_preprocess_page, but I can not tell if the current page is from a view:
function ...
11
votes
2
answers
9k
views
Content for textgroup views is not allowed for translation because of its text format
I have this problem with a view's header. I am allowed to enter a translation but the translated text is not rendered when the view is displayed in that language.
I have the following warning in the ...
11
votes
4
answers
25k
views
How do I access a field value in the $row variable in a field view theme template?
I'm overriding a field template for one of my views and I want to be able to access another field value from the $row variable. The documentation on the template file shows this:
When fetching ...
11
votes
2
answers
28k
views
How to alter single custom field value in views?
I have a view with field Global: Custom Text, which is modified as a link.
I want to change replacement tokens for generating this link, dependent on a value of other field.
Tried to modify this in ...
11
votes
1
answer
17k
views
Use views to display taxonomy children terms from parent
I'm hoping there might be a solution to this, but I do not have too much hope after searching a bunch. Currently I have some articles that have terms associated with them and these terms are 2-3 ...
11
votes
10
answers
6k
views
deleting comments in bulk
how can I delete all comments at once? I have seen how to do it with nodes and bulkdelete module, How to delete all nodes of a given content type?
but am looking at a similar solution for comments.
...
11
votes
2
answers
5k
views
How to replace Views PHP field and sorting by custom Views handler?
In order to address some Views performance issues and respect best practices, I'd like to replace some Views PHP I configured some time ago by my own custom handlers.
For instance I've got a Views ...
11
votes
3
answers
6k
views
Is there a way to consume external web services and show results in Views?
I have an external web service, which can be accessed using a HTTP call (with parameters passed as query string), and that returns the result in XML format.
I would like to use Drupal to access that ...
11
votes
2
answers
6k
views
Converting Term names with special characters to Term ID's in Views
I have a view where I want to use multiple termID's as arguments. I want to use a term name from the url and convert it to a termID. I've managed to do this easily enough and it works with simple 1 ...
11
votes
4
answers
3k
views
How to access services_views the correct way?
I am trying to fetch some views with the services_views module. Sadly enough I keep getting the response: "404: Not found: Display on view my_view_name could not be found".
I am using Views 3 and I ...
10
votes
2
answers
11k
views
How to make views slideshow, shows more items per page than one
I made a slideshow using views slideshow in drupal 7 to show bunch of logos, but it only shows one item per page, what I want is to show for example 6 logos per page when the visitor hit next, it ...
10
votes
2
answers
6k
views
Views options in UI not working
Options aren't working in my views UI. JavaScript is enabled. Example, if in views, if I want to re-write output, and I click the checkbox, I don't get more options.
10
votes
2
answers
4k
views
Generate only parent taxonomy terms in a block
I need to generate a menu for parent taxonomy terms.
How would I go about doing this? I'm also looking to generate these terms in a block.
I have a views set up right now that displays just all ...
10
votes
2
answers
8k
views
Does the Data Export module support exposed filters?
I am looking to use the Data Export module to export data to CSV files. However, I need the users to be able to filter the data first with exposed filters and then download the filtered results.
...
10
votes
2
answers
11k
views
How to display exposed sort in views using one drop-down widget?
By default Views 3.0 module for Drupal 7 uses two drop-downs to display exposed sort. First drop-down to select field name, and other one - to select sort direction.
How do i can exposed sort in one ...
10
votes
5
answers
6k
views
How can I invalidate a cache on a specific View?
I am facing a situation where I need to invalidate a specific View in order to initiate clearing the cache on that View.
views_invalidate_cache() clears ALL cached Views data, for every View on the ...
10
votes
3
answers
22k
views
What is the purpose of Views "Attachment", "Content pane" & "Context"?
I've just made a Views for a content type.
In one views, I need a page for the content type and a preview of 4 newest posts on the front page.
Page is not the problem. For front page preview, I just ...
10
votes
2
answers
3k
views
Negate contextual filters in views
I got a view, which lists nodes of same type, a "Other activities" view, i use this view on a activity node view. However i don't want the node i am currently viewing, to show in the list as well.
So ...
10
votes
3
answers
7k
views
Execute a view without rendering
I'd like to programmatically execute a view (providing arguments) and get the raw results, without rendering it. Is it possible?
When I use $view->preview('default', $args); it converts the ...
10
votes
3
answers
17k
views
Combine two views on one page [closed]
I have 2 custom views(block types) 'view_A' and 'view_B', one shows content the other shows orders. I need to cobmine them in a single page displaying in 2 different tables. Really dosen't make sense ...
10
votes
1
answer
6k
views
How do i use views with a custom entity?
I defined a custom entity with a few bundles. Is it possible to display these using Views? How do I do that?
10
votes
1
answer
2k
views
Difference between views handler and views plugin?
What are the main differences between view handlers and view plugins?
I checked the documentations for view handlers and view plugins, but I find them quite similar.
Can anyone show me what a view ...
10
votes
2
answers
3k
views
Views exposed filter auto submit loses focus
I have setup a view with ajax enabled. I have also added an exposed filter with autosubmit on so that as the user types in the text field the view will automatically update. The problem is that when ...
9
votes
2
answers
9k
views
Return a view's total_rows in Drupal 7 without php filter?
Is it possible to list the total number of rows in a view into the header of the view, without enabling the PHP filter? I know I can enable the PHP filter and output $view->total_rows in a header, but ...
9
votes
3
answers
7k
views
drupal 7.10: View of Most viewed posts
i am trying to create a most viewed posts page using views. I know how to create a page with most commented post but I can't seem to find the view count option. Any suggestions. Do i need to add a ...
9
votes
3
answers
25k
views
How to change programmatically exposed filters in views
I have a page view with exposed filters. One of the filters is term vocabulary, and that's dropdown list, user can select only one category (term).
I want to set programmatically one term from ...
9
votes
1
answer
11k
views
Drupal 7 views - Contextual filter content: Nid content id from url
I am working on a portfolio website where there are a lot of projects on the website.
When you have a project node open I want a view next to it with all the thumbnails of other projects.
The ...
9
votes
3
answers
7k
views
Drupal 7 views contextual filter (taxonomy: summary display), displaying a readable term-name instead of term-id
Within my view, I'm using a contextual filter—with a default "summary output"—to filter my results by taxonomy term.
The problem is that the summary-result is grouped by a listing of taxonomy term-id'...
9
votes
4
answers
6k
views
How can I learn the Views 3 API?
Where can I learn the views 3 API? I can use the ui to make views but I would like to create views using the API in my modules. I would settle for the views 2 API at this point. I looked at the docs ...
9
votes
3
answers
7k
views
Panels or Context module?
Can I please get some input on the differences between the two?
I'm building a website where using 'context' is very important. After watching this video series about Page Manager by NodeOne, I feel ...
9
votes
9
answers
12k
views
Views 3 remove exposed filter programmatically
I've got several node types each of them referenced to different taxonomy term vocabulary.
For category showing i use taxonomy_display module.
For example, we've got two categories: cues and billiard ...
9
votes
2
answers
14k
views
How does Views contextual filters work?
I'm trying to wrap my head around contextual filters again! I used it a while back but I just got totally stumped again. Here's what I'm trying to do:
Generate a cloned content node page with ...
9
votes
2
answers
2k
views
Any way to filter by week number?
Drupal 7, Views 3
I've got several views configured which display data over many years. The data is filtered by Year using a date field as filter criteria. For each year I have attachment views that ...
9
votes
1
answer
750
views
Query method not triggered in custom filter handler?
I'm using Views 3.
I needed to create a custom Views filter that handle dates range. So I looked at example and tried to mimic the behavior and I got some trouble.
It seems that when I extend my ...
8
votes
8
answers
15k
views
Modify the page title of view and set custom title for it
I am using views and drupal 7 . I pass arguments in the URL and i want this as view page title. This is possible by using override title check-box. But i want to modify this title. i.e do some ...
8
votes
3
answers
7k
views
Show node IDs along with titles in Entity reference Autocomplete list
I'll like to add this functionality to the autocomplete widget in Entityreference field to show node ID next to the titles in the dropdown list. The reason behind the idea is to differentiate between ...
8
votes
1
answer
13k
views
filter with taxonomy-term-alias instead of term-ID?
I've my view filtered by taxonomy term ID.
http://aelasoca.cat/web/
(in the main menu I've links to taxonomy ID's 3 to 8). How can I filter with the taxonomy term alias instead of it's ID ??
(not ...
8
votes
4
answers
15k
views
How to define Meta tags on Views? [closed]
Is there any module or some configuration that I can define the meta tags for the views page display in drupal 7 using Views 3.0?
8
votes
4
answers
10k
views
Creating a view that groups results by month/year
Does anyone know how to build a view that groups the results by Month/Year but can print the results expanded. Take the following dataset:
Events
Event Name Event Date
---------- ----------...
8
votes
1
answer
9k
views
Get display name from hook_preprocess_views_view
I want to use hook_preprocess_views_view in order for several views to share the same template, by adding theme_hook_suggestions as described in this article: http://greenash.net.au/thoughts/2014/04/...
8
votes
2
answers
6k
views
views Relationships and argument?
What are the relationships and arguments in Views? How do I use them? I have read some tutorials, but still don't know how to use them. Can someone explain them more clearly? Thank you.
8
votes
1
answer
8k
views
How do I display all the nodes in an organic group?
I'm on d7. Im trying to figure out how to display all the nodes that are in an organic group. I feel like this is a major thing that the OG module should do and don't know why I cant figure it out. I ...
8
votes
3
answers
15k
views
Views, Views-Slideshow, and Paging in Drupal 7
The situation is as follows: I have a content type Slide, and I want to display the three newest slides in a slideshow. The slides need to cycle, and the slides also need to be controllable by a ...
8
votes
8
answers
9k
views
Adding a theme suggestion programatically
I created a feature module containing only a view and a content type.
Right now my page-node-x.tpl.php and my views-view-y.tpl.php files lie in my themes directory.
Is it possible to move them into ...