All Questions
4,470 questions
2
votes
1
answer
2k
views
Views not updating?
Using d7.4 - I have views within some quicktabs that will not update. It only shows the results for everything created BEFORE the view was created- but not after. The views are for 'most recent, most ...
3
votes
2
answers
899
views
Exclude Latest Article From View?
I'm working with Views 3, and I'm trying to figure out how to best accomplish the following scenario:
On my front page, I'd like to have my articles set up as follows:
On the left, a large thumbnail ...
1
vote
3
answers
107
views
what kind of views should I use?
I am going to download the Views module for a Drupal 7 website I am creating, but there are 2 different versions: There is the alpha3, the development snapshot, and another one that doesn't have a ...
3
votes
2
answers
2k
views
Pass an array of nids to a view
How do I pass a view an array of node ids? I can create the view using the ui, but the query I want to run is outside the scope of views. I want to run the db query independently, gather the node ...
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 ...
4
votes
3
answers
686
views
How to prevent access to Views-only content?
When I'm developing sites in Drupal, I create various content types and taxonomy vocabularies that I use with Views to build displays. I might not ever want the nodes to be viewable in their own right ...
1
vote
2
answers
862
views
I want to put values from additional database in drupal 7. How can I do it?
I wanted to include additional values to the drupal site. Since it has around 3000 records and it is divided into categories ( a:1, a:2, a:3, b:1, b:2, c:1, c:2, c:3), I had set additional database ...
4
votes
1
answer
207
views
When I add the comments to each node in a Views content list am I creating a n+1 database query problem?
I have a node type product and a node type review. The review has a node reference field pointing to the node type product. Using the Node Reference URL module a user can click a link on the product ...
4
votes
2
answers
1k
views
Duplicates b/c of Node References, Views "Group By" not helping
I have a view that displays all 'parent' nodes referenced from 'child' nodes. I just want to list the titles of the referenced nodes, but because there can be multiple 'child' nodes referencing the ...
2
votes
2
answers
154
views
Change the number of entries depending on a theme setting [duplicate]
I have a theme setting that allows the administrator users to specify how many teasers should be shown on the home page by selecting a number from 1 to 4 (through a <select> field). Is it ...
6
votes
2
answers
6k
views
Group nodes by terms
How do you group a list of nodes by the taxonomy term?
e.g.
Term 1
--- Node 1
--- Node 3
--- Node 7
Term 2
--- Node 6
--- Node 9
--- Node 12
I have tried creating a view with "Node" and "Taxonomy ...
8
votes
2
answers
7k
views
How do I use contextual filters and relationships to show related articles?
So, I've been trying to get this figured out for most of the day. I had it essentially working in the previewer at one point, but now it doesn't seem to work at all.
Use case: each node published ...
15
votes
1
answer
12k
views
How to integrate Field collection module in Views?
I have created fields and grouped together with Field collection module. I have attached the group field (containing 4 fields), to user account settings in : admin/config/people/accounts/fields.
Now ...
4
votes
1
answer
2k
views
How to implement a Views 3 exposed filter in block as a list of links, and update the view via ajax?
I need to create a views exposed filter that is displayed as a list of links, and updates the view via Ajax. I've tried using Better Exposed Filters and it will display the filter as links, but ...
3
votes
1
answer
1k
views
How to get only the first value of a field in a Views template
I'm using Views 3.0 and I'm trying to access a field which allows users to upload 3 photos. When I type print $fields['field_productshots']->content; it displays all 3 product photos. Is there a ...
1
vote
2
answers
4k
views
Accessing field variables in Views 3.0
Since the Documentation for Views 3.0 isn't out yet, does that mean that the way you access field variables is different from Views 2.0? That's because whenever I try the following code (from Views 2....
3
votes
1
answer
3k
views
Use relationship for Views taxonomy term filter
I'm using the Commerce module, and I'm trying to create a view that displays the nodes with several exposed filters that should apply for the products.
Now, the node has a term field that references ...
34
votes
3
answers
22k
views
How do I group elements in a view?
I have 8 articles: Article 1 (Gaming), Article 2 (Local News), Article 3 (World News), Article 4 (World News), Article 5 (Gaming), Article 6, Article 7, Article 8.
In a view I would like to group the ...
3
votes
1
answer
5k
views
Tokens in Views don't seem to work
I added a new view (block) with FIELDS type. I added "Content: Comment count" to see the comments number, and in "Rewrite results" I clicked to "Output this field as a link", and added the token "[...
8
votes
4
answers
5k
views
How to redirect an exposed filter query to a views results page that lives in another panel page?
My setup: Drupal 7.2, Panels 7.x-3.0-alpha3, Views 7.x-3.0-beta3, Chaos tool suite 7.x-1.0-beta1
Say I want to create a fruits directory website. In views I have a content pane "fruits" with exposed ...
2
votes
1
answer
2k
views
How to create different Views pages for different taxonomy vocabularies?
I have two vocabularies that require two different taxonomy view pages. For example, I have vertebrates with terms fish, cats and snakes and invertebrates with sea cucumbers, spiders and snails. I ...
1
vote
0
answers
843
views
The taxonomy term field token doesn't show in Views
I am trying to call my taxonomy field token in the Views header.
I added the relationship "Content: Taxonomy terms on node," and then added the taxonomy term in the fields;
I went to the header ...
6
votes
4
answers
5k
views
Get the taxonomy term field in Views 3 override title
Is it possible to get a taxonomy term field in the title of a view, using the override title in the contextual filters? I know I can get taxonomy fields using relationships, but is there an argument ...
4
votes
4
answers
3k
views
How to show views block output in drupal menu?
I have views block and I want to display its output in sub menu when user mouseover on main menu. I on't know how to implement it. Is there any module for it?
Please help tell me how can I display ...
2
votes
2
answers
362
views
Custom Table or CCK?
I'm currently working on a project with a new requirement that, in a nutshell, queues submissions from users and submits them them to a remote API:
collects submissions from users (with a form)
each ...
2
votes
0
answers
2k
views
Using multiple templates for the same node & views
Ok so my problem is this, I want to be able to manage events in a simplistic form on a Drupal 7 site. I created the relevant content type and inserted some dummy content, all is well. I then move on ...
2
votes
1
answer
2k
views
Passing Arguments to block in 7.x Views
I've got a block view set up to get the latest 3 blog posts by term. I'm providing the default argument with the following:
$path = drupal_get_path_alias($_GET['q']);
$path = explode('/', $path);
if(...
1
vote
2
answers
3k
views
How do I add an SQL query with hook_views_query_alter()?
I have the following SQL query:
db_query("SELECT content_id, COUNT(*) as count FROM {votingapi_vote}
WHERE value_type = '%s' AND value = 1
GROUP BY content_id;", "option");
If I ...
2
votes
3
answers
4k
views
Theme is not working when files are uploaded from localhost to the web server
I have finally made it to point where i think it's ok to upload my work from localhost to a web server of mine.
I tried to upload my work from localhost to my web space (on hostgator).
My problem is ...
4
votes
3
answers
4k
views
How do I alter a view query to use "OR"?
The following is the content of the $query object that is passed to a view.
[where] => Array(
[0] => Array(
[clauses] => Array(
[0] => node.type in ('%s')
[1] => node.status 0
...
4
votes
1
answer
786
views
Feeding arguments into Views
I'm not sure how to frame this question, so I'm sorry if the answer already exists.
Basically, I want to know how to modify the way arguments are fed into views. For example, say I'm presenting a ...
2
votes
2
answers
2k
views
AJAX in a calendar view block
I have a month-view calendar block and would like to change months without page reload.
How can I achieve it?
5
votes
5
answers
2k
views
View Slideshow with different effects on the same view
I want to create a slideshow with caption using Views Slideshow.
I've set up a view with image | description fields, but everything slide at the same time. How can I set different effects for ...
20
votes
5
answers
13k
views
How do I use hook_views_query_alter()?
Following what reported in the documentation for hook_views_query_alter(), I created a file named alterform.views.inc and put it into an enabled module called alterform. I added the following code in ...
4
votes
2
answers
4k
views
Alter a Views query to use "OR" through the user interface
I have a view with a few different displays, each of them with slightly overridden filters, like this one used in a panel.
How do you add this pseudocode via the UI?
AND (node.type='story' OR node....
3
votes
1
answer
6k
views
Views calculations
I'm playing around with views, and I am sure on how to calculate fields based on Views data.
I thought Views Calc would do this, but it seems to only give me sums and averages of the fields. For ...
1
vote
2
answers
872
views
Exposed Views 2 filter for path alias
I am surprised that I am not able to find an existing Views 2 filter for aliases (paths). Seems to be such a basic property to filter results by.
I know Views can filter by argument but I need it as ...
1
vote
1
answer
3k
views
Sort criteria in views: how to add custom one
I have added a "node title" field. I want to add this sort criteria to the node: the number of times the node has been viewed by visitors in a week, descending.
If I want to add a sort criteria with ...
0
votes
1
answer
242
views
Show a dynamic text depending on the day
I'd like my Drupal website to show at the right top something like:
____ day (eg. Medicine day)
and fill __________ dynamically depending on the current day.
I will create a new content type ...
0
votes
1
answer
424
views
Views pagers for anonymous users
I've been trying to figure out why the pager element for views won't show up for anon users in Drupal 7. The following are the things I've tried to get them to show, cache clear, mess with the access ...
1
vote
1
answer
2k
views
Set dropdown list programmatically in exposed view filters
I have programmatically set a text CCK to a select and given a few choices:
function mymodule_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'views_exposed_form' && $...
4
votes
3
answers
8k
views
How do I replace the SQL query of a view?
I need to override an SQL query of a view. I'm using Drupal 7 and Views 3.x-7.x-alpha1.
I understood I can write my own query with views_pre_execute. I followed the instructions mentioned here: http:/...
5
votes
8
answers
9k
views
Adding an 'All' option to a views exposed filter
I have a Views exposed filter, that allows multiple items to be selected. It's based on the 'Allowed values' for a multiselect CCK field.
The exposed filter comes out looking like this:
Option 1
...
0
votes
1
answer
1k
views
How to add additional tab in the User Profile page using views
I have installed the flag module and it comes with some 2 views that are added to the list of views. One of them will stick to the user page as an additional tab and when clicked will show a list of ...
0
votes
1
answer
106
views
A view of full nodes with comments that are a content type
I have split up this question into other questions previously trying to join them up to create my final solution. However the combination of what I am trying is causing problems.
I need a comment ...
0
votes
2
answers
875
views
How can I list the current user's posts?
How can I list all posts of the current user? I know I should use Views, but how do I do it?
0
votes
1
answer
565
views
Custom CCK Currency exposed filter for available currencies
I am trying to set the available currencies programatically like this:
function mymodule_form_alter(&$form, $form_state, $form_id) {
/** Modify exposed filter views */
if ($form_id == '...
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
---------- ----------...
5
votes
3
answers
2k
views
Searching using Solr within Views
I'm learning Drupal, and having a lot of fun. I am approaching the phase were I'd like to make my content more accessible to users.
I haven't implemented it yet, but I am really liking the ApacheSolr ...
7
votes
2
answers
8k
views
Exposed Post date filter on views
When you expose a filter date on views you get something similar to the following:
When you expose the post date you get:
The former is a lot more useful. Is there a way you can get the post date to ...