drupal-views

How do you get a Min() or Max() in drupal using views?

I'm using Drupal's Views 2, and need to retrieve min values from fields in a custom table. The query for this is easy if I were writing it by hand--something like, "SELECT foo, min(bar) FROM table GROUP BY foo." But how would I do this using Views? I've already defined the table in a views.info file, so there's no trouble getting views t...

Add a Drupal menu item with a hard coded path to a view that accepts arguments?

I have a view page that accepts a taxonomy term id as an argument at /foo/%bar. I want to add several menu items to the primary links in the form of /foo/actual-bar. Whenever I try to do this I get the error message "The path '/foo/actual-bar' is either invalid or you do not have access to it." How can I add such menu items? Thanks, ...

How to write custom reports in Drupal

What's the "right" way in Drupal to create reports? I was hoping to use a view but am not having much luck. My goal is to create a table of rows containing three fields: user name, location, SUM of volunteer hours. Once I have this part working, I plan to expose filters for Location and Date. Views Calc only allows you to group by one f...

Drupal: View with exposed Taxonomy filter.. 2 questions

Hi, I'm using Views module and an exposed taxonomy based filter, to allow users to select a subselection of articles. I need to further customize my filter: I want the user able to order the tags alphabetically by clicking a checkbox (if this checkbox is unchecked the default order is reset. I want all tags selected in the beginning ...

Is it possible to save a Drupal View with no fields?

In Drupal 6, I have created a view, displayed as a block. My goal is to display some text if the view returns results, and hide it if the view is empty. I am using Header for the text, and this works perfectly except for the requirement to show at least one field. I can't save the view if I don't set any fields for display. Is there a wa...

Better control of views output markup?

Hello! I am developing a website with drupal 6, and using a 960 grid system based theme. I want to create a dynamic thumbnail gallery with Views, and using this jquery effect: http://www.queness.com/post/590/jquery-thumbnail-with-zooming-image-and-fading-caption-tutorial I have some experience with views, but I am by not means an exp...

DRUPAL: order exposed filter items, be carefully it is not that simple (I cannot user "Sort")

hi, DRUPAL question. I'm using Views, with an exposed filter (Taxonomy). I've downloaded the "better exposed filter" module to display it as checkbox list. a Now, how can I order the tags in the filter list ? "Views Sort" is not the solution because I only can order articles but not the filter items!! I want to add an option (checkbox)...

DRUPAL: Views, exposed filter: how to unselect all items as default

hi, I'm using Views with an exposed filter with tags. (integrated with Better exposed filter). In the settings I can select one or more tags as starting selected tags when I visit the page for the first time. However I cannot unselect all of them. I would like to not have selected tags at the beginning and at the same to see all artic...

Merge 2 views in Drupal - using filters?

Hi there, I have a view for news items and one for events. I want to create a list that lists both of them together. However, I want to filter the news items on a custom date expires field (that events doesn't have) and I want to filter the events on a custom event date field (that news doesn't have). Can I do this? Ben ...

Drupal, Views, Exposed filter, make tags unselectable

hi, I'm using Drupal Views with an exposed filter with several tags. I would like to make some tags "unselectable", if they cannot be combined with the already selected tags. (They would give empty results page. thanks ...

How can use the currently displayed node to filter a block-level view on that node's page?

I have parent/child relationship set up via Node Reference. A Child record can have a Parent record selected from a Node Reference field (this is optional -- I can have Parent-less Children as well). I've created a Views block to appear on the Parent pages, below the content. It's going to show a table of all the Child nodes for that ...

Create a "Products Listing" page that embeds a context-aware View of specific type of products

I have the following page structure: Product listing for type 1 |-> Product 1.1 |-> Product 1.2 ... Product listing for type 2 |-> Product 2.1 |-> Product 2.2 ... so I have created a content-type "Generic_Product_Listing" which has a field_type and would like to embed a view that only gets the products of that specific type. How can ...

Drupal: Template Files, Modules and Content Types for Advanced Theme

Intro I am in the process of trying to convert my first HTML/CSS design into a theme for Drupal. I have used ModX for quite a few designs and appreciate the ability to create different page templates and custom variables to be assigned to those templates. However I seem to be having some issues making the transition. The site I am work...

Month navigation sidebar in blog section?

I have a blog section in a drupal website, built with Views. I want to add a sidebar with month navigation (as in each mont is listed with the number of posts, etc). How can I do this, preferably with Views? ...

Drupal: Sorting a view programmatically

Hey there. I'm trying to take the results of a view - using the function views_get_view_result() - and sort the array in a way I couldn't do from within the Views interface. So far so good. I've got a $rows variable with all of the stuff I need. Now... How do I put it back? :) Before I needed this sort, I used views_embed_view(), but I ...

Update {node_counter} table programatically in drupal

I currently use the statistics module (core) on my Drupal 6 install. This increments a count in the {node_counter} table every time the node is viewed, and this works. My question is - can I programmatically increment this counter as well? I am looking to achieve this when users interact with content created from views (say click a ligh...

DRUPAL, Views: exposed filter.. how can I unselect all tags ?

hi, I'm using Drupal, Views, tag exposed filter and I would like to allow my customer to select the default tags from back-end. However when he selects some tags is not possible anymore to unselect all of them. See initial picture: http://dl.dropbox.com/u/72686/Picture%201.png Now all the tags are unselected, but if I select just one ...

Drupal, Views, Exposed filter: custom default selected tags

hi I'm using Drupal, Views with a exposed filter (using taxonomy). My customer wants to set from back-end the default selected tags (in order to pre-filter the views content). In the exposed filter settings, there is functionality. However, it doesn't work properly: when I click on "Select None" link (I'm using better_exposed_filter m...

How can I add a link with a UID from a User Reference from a table in Drupal Views

I have the following in Drupal 6: A Master CCK type which contains a User reference field and other fields. There will only be one record per user here. A View of this CCK, shown as a table, with one of the fields being the user ref from the CCK type. This field is initially shown as a user name, linking to the user profile. A Second...

View of nodes and their translations

I'm trying to create a view of nodes and their translations. Specifically, I want each row to show the node title for each language. The way I'm doing it right now is by filtering the view by a specific language, then adding one relationship of type "Node translation: Translations" for each language on the site. I can then choose the "N...