Views Developers

Events happening in the community are now at Drupal community events on 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.

How to create a dynamic drop-down exposed filter?

Posted by kirilius on January 10, 2011 at 7:47pm

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

Management of root and leaf items in taxonomy vocabularies

Posted by bellHead on January 4, 2011 at 11:48am

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

Inner joins with MAX in hook_views_data()

Posted by rjleigh on January 4, 2011 at 7:43am

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

VARQL, a Views SPARQL Query Plugin

Posted by Remon on December 28, 2010 at 7:34pm

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
21 comments Categories: , ,

Best way to enable triple tags

Posted by gregorychandler on December 19, 2010 at 5:11am

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

Modifying Views Filters programmatically

Posted by timting on December 18, 2010 at 8:58pm

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
9 comments Categories:

json data expose to views

Posted by johdax on December 15, 2010 at 3:16pm

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

How does Views query multiple taxonomy terms tied to content?

Posted by wrburgess on December 14, 2010 at 3:45pm

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
2 comments Categories:

Views 3 pluggable backends : is this what i need ?

Posted by redben on December 8, 2010 at 7:29pm

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

    Create views fields from taxonomies for my module

    Posted by walkero on December 1, 2010 at 11:11am

    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
    Categories: ,

    external module question..

    Posted by adnasa on November 29, 2010 at 7:54pm

    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
    3 comments Categories:

    Views Theming

    Posted by rpeters on November 26, 2010 at 2:26am

    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
    7 comments Categories: , ,

    Exposed filters view by date

    Posted by rpeters on November 25, 2010 at 5:49pm

    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
    4 comments Categories: , ,

    Extend my own handler?

    Posted by wodenx on November 19, 2010 at 1:43pm

    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

    Difference between creating a relationship and adding a join

    Posted by wodenx on November 17, 2010 at 9:53am

    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

    Customize the view title to use when an argument is present

    Posted by potassiumchloride on November 13, 2010 at 1:06am

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

    Read more

    views_plugin_style questions

    Posted by attiks on November 9, 2010 at 8:11am

    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

    Posted by protoplasm on November 3, 2010 at 8:11pm
    Last updated by protoplasm on Wed, 2010年11月03日 23:27

    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

    Views- How to promote to front page

    Posted by meeks53113 on October 31, 2010 at 4:26pm

    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
    2 comments Categories:

    View fields & Views Custom Field & Author of node

    Posted by charles.holtzkampf on October 31, 2010 at 1:20pm

    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
    Categories:
    Subscribe with RSS Syndicate content

    Views Developers

    Group organizers

    Group notifications

    This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

    AltStyle によって変換されたページ (->オリジナル) /