Views Developers

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
This group should probably have more organizers. See documentation on this recommendation.

This group exists as a place for people interested in the group to talk about Views development; all development talk is encouraged here, from people who want to work on Views core to people who are interested in Views' API for their own modules. This is a good place to:

1) ask questions
2) talk about problems
3) propose ideas.
4) talk about views related projects.

This group is now unmoderated, and anyone can join at any time. Public posting of ideas is encouraged.

What I want most out of this is to keep track of what views related projects are going on and their status, and proposals for what people would like to see as Views moves forward.

Note: This is a working group. Do not post jobs here, you will lose your posting privileges entirely. Do not post support requests here; they will be deleted.

kirilius's picture

How to create a dynamic drop-down exposed filter?

I have a node type Gallery and I am building a view that displays each gallery as a grid of thumbnails. The view has one argument: Node ID. I need to add that as as an exposed filter so the users will see ALL galleries in a drop-down list and when they select a gallery, it will be displayed below.
The catch is that the list of my galleries is not static - I can add/remove/rename existing galleries. Basically I need the drop-down list to be populated from another view.
What is the best way to do this?

Read more
bellHead's picture

Management of root and leaf items in taxonomy vocabularies

I have been making friends with Views quite rapidly over the past week having previously used custom developed modules possibly a little too much.

I'm finding it difficult to manage the behaviours required at the root and leaf of a hierarchy which are different from the middle of the structure. I would like to contribute some additions but would first like some feedback on whether the changes would be in line with the Views project in general and which of the possible routes would be least painful to develop.

Read more
rjleigh's picture

Inner joins with MAX in hook_views_data()

I have a custom module that records a specific module status history per node. The table has several fields, but here the important ones are nid, a timestamp field and a status text field.

My module just keeps adding to the table to keep the full history of changes.

If I wanted to use an SQL call to view the latest entry for each nid, I'd use:

SELECT a.nid , a.timestampfield, a.textfield
FROM (
  SELECT nid, MAX(timestampfield) as maxtime
  FROM mytable
  GROUP BY nid
  ) as b
INNER JOIN mytable
AS a
ON a.nid = b.nid
AND a.timestampfield = b.maxtime;
Read more
Remon's picture

VARQL, a Views SPARQL Query Plugin

Hi, yesterday I've released VARQL (SPARQL Views Query Backend), the module is intended to help in generating SPARQL queries using our Views lovely and intuitive UI.
VARQL utilizes Drupal 7 built-in rdf mapping in building SPARQL queries; for example if you want to select a couple of recored from DBedia, namely, name and homepage, varql will map these fields to foaf:name and foaf:homepage respectively to build a query

Any reviews or feedback would be greatly appreciated (especially regarding RDF mapping and views query plugin).

Read more
gregorychandler's picture

Best way to enable triple tags

Hi there! New to Drupal. I need help.

What module(s) or resources are best to help me enable triple tags, where:
1. Each tag is composed of a subject, predicate, and object.
2. The subject, predicate, and object can be chosen by users from specific nodes on my site. Each field can suggest nodes as you type.
3. Two nodes with the same name can be differentiated by an ID or something.

My goal is to link my nodes into a linked graph that can be queried by something like views. I want to display the relationships between nodes (the graph).

Read more
timting's picture

Modifying Views Filters programmatically

I've been trying to create a view for blog posts which given the url, say, "blog/after/2010/02/02", will take those arguments and give me the 10 entries in my blog after 2010/02/02. I thought it would be relatively simple, but I haven't been able to find enough information on the web in order to do this. I'm not sure if I've taken the right approach. I've used http://groups.drupal.org/node/82219 as a template to use the hook_views_pre_view() function to access my view's filters (I've created a created filter on the blog entry post date) and modify it with the arguments on the URL.

Read more
johdax's picture

json data expose to views

I have a custom CCK compound field, which stores a hierarchical multidimensional tree in json in a field type. I now want to expose this data to views, but in flat way (table with parent relationships).
Any help with how to implement views_data is appreciated.
kind regards, thanks in advance

Read more
wrburgess's picture

How does Views query multiple taxonomy terms tied to content?

With Views, I already know how to render multiple taxonomy terms that are associated with a single piece of content. What I can't figure out is how Views actually queries the database to get the job done.

For example, this is easy to set up in Views:

Title: "Brett Favre is Hurt"
Body: "blah blah blah"
Tags: Football, Injury

Title: "Cliff Lee Signs Contract"
Body: "blah, blah, blah"
Tags: Baseball, Free Agency, Philadelphia

Read more
redben's picture

Views 3 pluggable backends : is this what i need ?

I am working on a project which involves querying a web service. A hotel search service.
So instead of going with custom standalone code, i'd like to see if i can implement this while building up on views.
Now that Views 3 has pluggable backends, may be it is possible for me to use it, but i need some clarification :

<

ol>

  • The web service i'll call is asynchronous : query it and give it a callback url so that it can reply later with the results.
  • Read more
    walkero's picture

    Create views fields from taxonomies for my module

    Hello to all.

    I would like to ask you a solution, and of course your help, for a problem that I have.

    • I created one module where I create some forms for the users to complete. There are also fields with terms from taxonomies.
    • I created a tables in the database called "cvprofile" which among others has the following fields "cvid, uid, ..."
    • I created a second table which has the relationship between "cvprofile" and "term_data". There are three fields, "cvid, tid, vid". Here I store the terms the user selects in the forms.
    Read more
    adnasa's picture

    external module question..

    Hey guys

    I've built an external (mini-)module with the help of this page: http://views-help.doc.logrus.com/help/views/api

    using the views_api(),
    with this module I only wanted to introduce new tables and fields to the views module, view type "Node".

    Right now it looks good to me, but I still have this gut feeling telling me that I should ask you guys the following question...
    – how do I ensure that this module is 'safe' ?
    – so far I've included the views_api(), views_handlers() and views_data()? is there another method I need to include?

    Read more
    rpeters's picture

    Views Theming

    How do I theme a particular view. I want to remove the submitted by on a particular view, but still keep submitted by on the conetnt type.

    Read more
    rpeters's picture

    Exposed filters view by date

    I am designing a webpage where I have created cck fields and one is by date. I have exposed the date field so people can search by date, but it seems not to be working. Why is that? What do I have to do to make it work?

    Read more
    wodenx's picture

    Extend my own handler?

    Hello again,
    I'm wondering if there's any way to specify one custom field handler as the parent of another. In other words, I have a field handler in one module that extends views_handler_field_prerender_list. Now I'd like to implement a handler in another module that does much of the same processing with a small differrence - so i'd like it to extend my original handler. I'm not clear enough on the way Views handles code loading to know the best way to do this. Can I simply do

    module_B_views_handlers() {
    return array(
    'info' => array(

    Read more
    wodenx's picture

    Difference between creating a relationship and adding a join

    Hello All,

    Just getting started with the views API and trying to find my way. Here's my scenario.

    I am developing a module which will serve as a bridge between two other modules (let's call them A and B). Neither module knows about the other, but both expose their tables to Views, and there is a field in A's table that relates to a field in B's table (unbeknownst to either).

    Basically, I want to make the fields from B available in views based on (or including) A. From what I can tell there are two ways to do this (assuming that table_a_field relates to table_b_field):

    Read more
    potassiumchloride's picture

    Customize the view title to use when an argument is present

    Question: How can I display the Node Nid as part of the view title when a Node: Nid argument is present?

    Read more
    attiks's picture

    views_plugin_style questions

    I'm building a views_plugin_style for the flot module (views 3/drupal 7, see [#961976] for more code)

    Part 1

    I need to execute an extra query while the query of the view is being executed (inside function query()),
    1/ so I first tried to clone the current query using $minmaxview = clone $this->view but all referenced properties aren't cloned,
    2/ so I tried $minmaxview = unserialize(serialize($this->view)) but that gives an error "PDOException: You cannot serialize or unserialize PDO instances"

    So my questions are:

    Read more

    Views Cookbook

    It took me quite a while this morning to figure out how to create a view that lists friends (user relationship module) comments and nodes. I thought maybe I would begin a views cookbook that would serve as a fast-track to creating slightly more complex views.

    1. Create a list of friends' comments for any specific user page...like whateverdomain.com/users/#### using the uid of the user as the argument.

    Read more
    meeks53113's picture

    Views- How to promote to front page

    Good afternoon,

    I have a question abot 'Views'. I understand the taxonomy, field, argument etc. functions in the Views module. But, how do I promote my views to different pages?

    Right now, I am using the 'fields' settings, for example, to pull data from the site. I want that information to appear on the front page of the website though. Instead of information appearing like I set it up with the Views module on the front page I am seeing the items that I 'promote to the front page' within the blocks module on the front page.

    I am at a critical point, I think.. Please help!

    Read more
    charles.holtzkampf's picture

    View fields & Views Custom Field & Author of node

    Hi All,

    This is a two part questions:

    1. The function im after & wheter its possible with views out of the box
    2. If not possible with views out of the box, I found a module that provides this function, but I need some help with php code.

    [Part 1]
    Wondered if anyone can tell me whether the following is possible within views.

    I have installed To do module - http://drupal.org/project/to_do I then created my own view which lists all the tasks created in a particular Organic Group, which works lovely.

    Read more
    Subscribe with RSS Syndicate content