Views Developers

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.

Starting Views2 Documentation

drewish's picture
public
drewish - Tue, 2008-03-25 22:30

Creating this wiki page as a dumping ground for bits of documentation on Views2. It's totally a work in progress that can serve as a basis for future handbook pages.


Views Theming Documentation

merlinofchaos's picture
public
merlinofchaos - Mon, 2007-05-21 19:49

This is an effort to get people in the community to do some work for me. Maybe I'm a bit lazy, but this is a piece of work that I've admitted I'm simply never going to get to. Yet it is needed.

This document is intended to be a comprehensive documented on theming Views. It should cover all of the basics, and it should also include tutorials. It really needs to be both.

I want to start with a topic list. I'm not even sure the best way to lay this out, so I'm going to start with the really obvious topics:


Building a view from a different source (not Database)

drunken monkey@drupal.org's picture
public
drunken monkey@... - Tue, 2008-07-01 15:34

Hi, everyone!

I'm doing a GSoC project to improve the apachesolr module (See here for details). Core of the project is to find a way to create a view showing results from a Solr search query. And this is where I could use some ideas from people more experienced with Views than me.


Views 2 RC release notes working post

merlinofchaos's picture
public
merlinofchaos - Thu, 2008-06-26 06:27

This is a wiki to try and get the community to help me out with the Views 2 RC announcement, which should be coming within days. Maybe hours. But probably days. This is cross-posted to Usability as suggested in #drupal IRC, as there are apparently folks that might help there.


Is the core forum module still needed anymore?

public
specmav - Tue, 2008-06-17 09:13

I know that I will most likely be wrong about this, but with the advancement of CCK, Views, OG and Panels, is the forum module really necessary anymore? My idea being is that with all these "practically core" modules, isn't it feasible to create a forum with just these modules?

I can create a content type called "forum post" manually, set the taxonomy for the forums (granted containers would be an issue) and use views to custom tailor the data shown to the users. I can already create 8/10th's of the forum functionality with just that scenario. Unless I am missing something.

Views: list one node per user

public
sterwa - Mon, 2008-05-26 18:36

Hi,
How can I set up a view with one (latest) blog entry per user, sorted by node submission type. Can't seem to figure out how to set up the whole "one node per user" thing...
Thanks!

Views 1.x on Drupal 5 update

mikeryan's picture
public
mikeryan - Mon, 2008-05-12 14:02

Any chance of rolling a new release for Drupal 5? I know everyone's excited about Views 2, but the last release (1.6) was last July, and I've run into some bugs that do have patches sitting out there... I've got a client that's uncomfortable going into production with Views 1.6 + CVS + uncommitted patches...

Thanks.


Views query optimization

bjaspan's picture
public
bjaspan - Wed, 2008-05-07 18:02

I am working on "fields in core" this week and recently found myself pondering the problem of very inefficient CCK-related Views queries. Here's a brief summary of the situation:


Group my city and country

public
safknw - Wed, 2008-05-07 13:31

I'm building a link directory. Links are location based. I want to to create link listing grouped by Country and Cities. I'm not able to find out how I can do this.
Pls help me.

cooment views on views 1

public
safknw - Mon, 2008-05-05 18:10

Hi,

I have tested views 2 version with drupal 6. What feature I like is new interface and type of views like views for nodes or comment or user. Now I have a question in my mind how I can create comment views in views 1.6.

Sharique

Views 2 help tasks remaining

merlinofchaos's picture
public
merlinofchaos - Mon, 2008-04-21 07:19

This is a quick list of help pages I've identified and their current state.


Views 2 & Taxonomy Question

public
matt_paz - Sat, 2008-04-19 18:50

So, it may be premature to ask this and this may not be the right place, but here is some sql generated from a view I built using the latest dev build of views 2 (as of Friday). Two questions ...

1) shouldn't the joins use term_node's vid instead of nid (More Info)
2) shouldn't the joins on term_node use INNER JOIN instead of LEFT JOIN


SELECT DISTINCT(node.nid) AS nid,
node_data_field_face_plate.field_face_plate_value AS node_data_field_face_plate_field_face_plate_value,

my.drupal.org

catch's picture
public
catch - Sat, 2008-04-05 13:49

Thought it'd be a good idea to start a discussion specificially on how this might work.

This is a very rough outline from my first post on this subject Drupal.org the redesign - high level.


Idea for views and RSS

Drywall's picture
public
Drywall - Thu, 2008-03-20 15:45

Hi,

I'm not sure if this is the right place to propose an idea for modifying/improving the views module (or, to be more specific, the views_rss module). If not, feel free to delete this post and please accept my apologies.


D5, e-Commerce txnid in Views

sime's picture
public
sime - Wed, 2008-03-19 04:29

I did a little experiment recently to see how we could get e-Commerce Transactions into views in D5. The reason I did this was because I'd like to de-couple store crud routines from store admin ui code so that someone could write an alternative admin interface for ecommerce. The current admin interface is clumsy and always begging to be hacked.

For those not familiar with ecommerce, transactions are represented by a few tables, I was just interested in the main one ec_transaction for this experiment.

(Note: yes, usernode does something like this for users.)


Views 2 development tasks remaining

merlinofchaos's picture
public
merlinofchaos - Sun, 2008-03-16 02:24

This wiki page summarizes the remaining Views 2 development tasks. This is a wiki so that interested developers can help implement some of these features. I can provide help implementing this stuff on IRC; find me in #drupal-views. (Note: Not a support channel. Development. I will quickly ban inappropriate support requesters).

People are reporting that they get a whitescreen when editing the wiki. I have therefore opened up comments to let people claim/unclaim tasks by adding a comment.


Views 2 - "Header" and "Footer" areas

bb_matt's picture
public
bb_matt - Wed, 2008-03-12 14:02

First off, if this has already been discussed/decided or if, as a non-views-developer, just a web-dev using drupal, I'm not allowed to post here, please say so and I'll move along never to return to this group.

Right, onto something which in the current drupal5 views module, I've found a little frustrating.
It's related to the Header, Empty text and Footer text input areas.

I have to lock down the Views area to knowledgeable site admin's only, as users I define as editors have a nasty habit of breaking my carefully constructed views logic.


Views 2 Drop tasks

catch's picture
public
catch - Tue, 2008-03-11 20:54

It looks like there's going to be an explosion in the number of people doing Drop tasks soon (see http://lists.drupal.org/archives/development/2008-03/msg00105.html for more), so it'd be good to get some Views 2 ones up.


how can I filter a view by the date field

public
avior@drupal.org - Mon, 2008-03-10 19:29

Hi There
I have been trying to filter view with the cck date field, and can't make it to work , i am missing something...

I have an defined event content type with a start date & end date
I have created an events view that i wish to filter as a start date with the logic :

  1. if no argument has been sent to the view than start_date >= now
  2. if a date parameter has been sent then start_date >= arg[0]

if have 3 filters , first 2 are published and term id , and another filter "start_date" "greater or equal to" and set the value to "now"

in the arguments i have set the code

Enough with the support requests

merlinofchaos's picture
public
merlinofchaos - Mon, 2008-03-10 15:23

I have gone through and deleted a bunch of support requests. I realized that the front page of this group was almost entirely support requests and that was giving the wrong impression of the group, and simply inviting more.

This is a working group; it's a group for people who are working on Views or on Views-based modules. It's absolutely not a place to ask how to do some random task with Views on your site. Those posts are distracting.


DabbleDB demo

moshe weitzman's picture
public
moshe weitzman - Sat, 2008-02-16 18:20

Six months ago, Dries linked to this DabbleDB demo from his blog. He hailed it as a vision for what CCK and Views could ultimately be. The demo is positively breathtaking in the flexibility of fields to morph and change. Further, the usability of the UI is outstanding. Everyone in these group really ought to watch the demo, and discuss what small changes we can make to get closer to this.

Some starting points:

  • Can we design a flow whereby node_import module could suggest and then create the needed CCK fields to hold the incoming data?
  • Can we add a metric ton of flexibility to CCK whereby we can take a field and move it into a new content type (i.e. the demo moves Person into a 1st class object) and move fields (and data) between content types (in the demo, the Company field moves over the new Person 'content type').
  • Could we get a View created automatically for each content type that has the right exposed filters automatically? And then a UI which progressively shows those exposed filters in the 'query by example' method in the demo?
  • The demo has a notion of saving ad hoc queries. Our equivalent is Views Saved Searches. Should this be a core feature of Views, or otherwise better integrated?

Sneak Peek of Views 2 at Drupal Newsletter

aaron's picture
public
aaron - Sat, 2008-02-16 04:07

I just wrote up a sneak peek of Views 2 for the February Drupal Newsletter, which is to be published next week. I'd love some feedback from people in the know before going forward with it. I think the work being done is incredible. The wiki is at http://groups.drupal.org/node/8258 (you have to subscribe to the Drupal Newsletter group to see it).


Implementing natural sort

public
mooffie - Mon, 2008-02-04 13:18

Natural sorting, also known as natural order, is about putting the string "Chapter 10" after the string "Chapter 2".

Or about putting "I like it with 3.5 spoons of sugar" after "she'll have 2 spoons".

We humans prefer it this way.

New Attendees tab on event nodes

moshe weitzman's picture
public
moshe weitzman - Mon, 2008-01-28 21:48

I just added an Attendees tab to all event nodes on this groups.drupal.org site. This lists all users who have signed up for an event. Signup happens by clicking on a one of the node links that reads 'i am not attending'. I'd love someone to create two graphics which will sit at the bottom of event node views which encourage users to attend or unattend an event. The current link is a little too subtle.


A real newbie question...about cck and multi-part forms.

public
mjh5598 - Fri, 2008-01-25 20:52

I got the hang of cck which is really cool by the way. I have 3 questions that pop up:
1. how to i create a multi-part form ???
2. how do i do a back button to go to the previous page and have it remember the info i added?
3. how do i can i create a dropdown of fields/nodes i created before with dropdowns and use that info in a new version of the form???

has anyone seen a good online video tutorial that i can tap into..that guy rob from the awakened voice learning center is the best with his online stuff..

thanks
mjh

Multiple Views (teaser and table view) on 1 Page

Liliplanet's picture
public
Liliplanet - Fri, 2008-01-25 11:57

Hi,

Please how is it possible to create 2 views on one page which would sort in the following way : -

  1. Enhanced Listing : a Teaser List
  2. Basic Listing : a Table View

A fabulous example can be seen at:

http://www.productionhub.com/directory/listings.asp?section_id=7&cat_id=...

I've tried Views Fusion and Views Union to no avail.

So much would love to make this work and immensely appreciate any reply.

Lilian


Views UI Thread the Second

merlinofchaos's picture
public
merlinofchaos - Thu, 2008-01-24 22:59

Now that I've narrowed down a direction, this thread is for commentary. Rules:

We're going with vertical tabs.

We're going with the summary above, edit area below.

There are only two actual steps for creation.

I'm already working on the implementation.

The WIKI is here: http://groups.drupal.org/node/8428 -- it may be edited to include things we know or like and wish to pursue. For speculative commentary, please put it in this thread.


Views 2 UI: summary of progress

public
alpritt - Thu, 2008-01-24 22:46

In order to get a birds eye view of the current state of the Views 2 user interface, the needs of the UI and the decisions made so far are summed up below.

(Please refer to http://groups.drupal.org/node/8429 for ongoing discussions. This is a wiki so please feel free to help keep this up-to-date with the latest progress, or fill in any details that have been missed so far. Please only post solid information here; conversation should go in the sister thread. Thanks.)

Latest ideas

The beginnings of the favourite idea so far:

http://humte.com/files/ViewsUI-summaries.png

Maintaining the breadcrumb trail in a view?

public
kirilius - Thu, 2008-01-24 18:06

Here is the situation:

I have a node type called Destination. I have created a view called Destination Pictures, which shows all pictures from a given destination.
Using the following code I have added this view as a new tab under the main Destination node type:

<?php
function dest_pics_menu($may_cache) {

$items = array();

if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
if ($node->nid && $node->type=="destination") {
$items[]= array(
'path' => 'node/'. arg(1) .'/dest_pics',

Issues with default views and exposing data

public
nedjo - Wed, 2008-01-23 23:46

I've been wrestling a bit with how to create default views without exposing potentially sensitive data. What are others thinking about this issue?

The Views module includes support for "default" views implemented through a hook, hook_views_default_views(). A quick search through the contributions repository shows close to 60 modules implementing this hook.

Lenses (selecting a subset of fields from a node)

David_Rothstein's picture
public
David_Rothstein - Tue, 2008-01-22 05:32

I'm working on an idea for a new module and was wondering if anyone had any feedback. It may overlap a bit with existing modules (especially Views), but I think it's different and potentially interesting.

Basically, the idea is this: Sometimes, when viewing/editing/creating a particular type of content, you might want to do so through a "lens" that only shows you a subset of fields that you are interested in at that particular time. You only want to deal with those particular fields, without having to deal with the node as a whole (which may be very large and complex).


Bounty: Code snippet to organise view alphabetically

blogjunkie's picture
public
blogjunkie - Thu, 2008-01-10 10:05

Hi Views Developers,

I admit that I joined this group just to post this bounty, but I would really appreciate your help.

I'm trying to create a view that outputs nodes like this - http://www.lawteacher.net/contractlawcases.php

I'm currently building a similar case law library. I've created a Case Law content type and given it a taxonomy with terms like Contract Law, Criminal Law etc.


New view type: Image Gallery

joachim's picture
public
joachim - Mon, 2008-01-07 11:13

You might be interested to know about a new view type that's now included in the image module: an image gallery view for image nodes.

This is in the latest 5.x-2.x-dev release of image. Existing galleries and blocks are reimplemented as views.


Making use of Views Arguments - What do you do?

public
kyl191@drupal.org - Fri, 2007-12-28 14:48

Hi,
I'm taking part in the GHOP Contest (http://drupal.org/node/195913) and as part of my task (Improve documentation on arguments: http://drupal.org/node/201529) I need to find some sample uses of arguments in Views.

So, I'm appealing to the Drupal Community to post your innovative and interesting uses of arguments in views - from the simple to the complex, anything goes!

Thanks for your help!

How to add context-dependent content to the view's output?

public
kirilius - Thu, 2007-12-20 21:56

I have a view that displays (let's say) a grid (gallery) of pictures related to a given node X. This view has a parameter that's passed through the URL: http://mysite/node/$arg1/pictures. It works fine but I would like to be able to make a few changes to the output:

1) Change the title so that it says something like "Node X pictures", where Node X is the title of the node with ID that's passed through the parameter $arg1.

2) Add a link at the somewhere on the page that says "Start a slideshow". I have the slideshow view ready. Let's say it's URL is http://mysite/node/$arg1/slideshow

How to turn a view into tab for a specific node type only?

public
kirilius - Tue, 2007-12-18 20:39

Hello,

I have a view and the goal is to turn it into a tab that shows only for a specific node type. Here is what I do:

I have a page view called for e.g. x_pictures that is supposed to display all the pictures associated with a given node of type X. The URL I have given to it is node/$arg/pictures
In the "Menu" section of the page definition I have the following settings:

Provide Menu - checked
Provide Menu as Tab - checked
Make Default Menu Tab - NOT checked
Parent Menu Item Type - Already exists (don't create)

Views in the context of a node

public
kirilius - Fri, 2007-12-14 20:18

Hi there,

I posted this question in the main Drupal forum but maybe this group is the right place for it.

Here is the situation:

I have a view defined that shows some information relevant/dependent on the context of a node. In my case I am using the view to show some related nodes to the main one.
Let's say the URL is http://mysite/views/show_more_data/[nid]
There is one parameter that is the node ID of the node we want to display more info about. This view works fine when called through the URL (a page view).

Adding or theming argument defaults

joachim's picture
public
joachim - Sun, 2007-11-25 17:39

Is there a way to add a new type of default view for an argument, beyond the built-in 'Return Page Not Found', 'Display All Values', etc?
Or failing that, can it be drastically themed to return something different, from the definition of a new argument type in a module?

I'm trying to replicate the galleries made by image_gallery.module as a view, and I need to show a list of top-level galleries for the URL with no arguments.


New Bonus View type

dwees's picture
public
dwees - Sun, 2007-11-25 04:32

Hi there,

I've been playing around with the theming functions of Views and I constructed a very simple theme for a View. I call it: Flash XML Viewer.

Basically what you do is construct a regular block view and choose 'Flash: XML Viewer' from the type select. Then you define your filters and sorting order (fields and arguments will not be used for this view). Not sure if exposed filters will work, haven't tested, just built this module this morning.


Views 2: Call for help

dmitrig01's picture
public
dmitrig01 - Mon, 2007-11-19 01:23

Views 2 is currently being updated for Drupal 6 compatibility, but it needs major help in order to be ready for the Drupal 6's approximate release date! We're short on people and short on time, so here's the bottom line. Without your assistance and contributions, there will be no Views for Drupal 6 within any useful timeframe. If we don't have Views 2 ready for the D6 release date, the vast majority of casual users might not even bother to download and try Drupal 6. That would be bad, so you need to get involved in helping to complete Views 2 so this scenario doesn't happen!


Adding a "number of posts" field to a view of usernodes

katbailey's picture
public
katbailey - Thu, 2007-11-08 01:16

Hi there,
I'm very new to module development and I've been asked to create a module that extends the Buddylist module using Views to create a 'Buddy Gallery'. So far so good. The trouble is, one of the fields that needs to show up for each Buddy is the number of posts they have made. I thought I could use CCK Computed Field for this but this only seems to get updated when the usernode is re-saved.


views links as images?

CorpX's picture
public
CorpX - Tue, 2007-11-06 21:45

Hello,

I have a quick question regarding php and how views links are built. Here is the edit link code below. (views/modules/views_node.inc) How would I insert an image instead to say /modules/views images/edit.png? I'd love to add it as an option but it would conflict with the ability to enter the text you see on the front end. If someone would give me some assistance, I'd love to apply it where ever possible - view, comment, delete, edit etc... and contribute it back. I am new to php and eager to learn.


Complex queries and views

Benjamin Melançon's picture
public
Benjamin Melançon - Mon, 2007-11-05 21:04

The use case: I have Organic Groups which are associated with a vocabulary, and I want to list various content types associated with organic groups that are associated with a taxonomy term.

I ask the question here because it could be the entrance for some people (like myself) to actual views development.


Huge views query killed the server

public
z.stolar@drupal.org - Thu, 2007-11-01 08:08

Hello all,

I'm using the Taxonomy: term ID argument as a view argument, and I'm passing to it a list of about 20 term IDs (it changes from page to page).
The result is a huge query that chokes the MySQL server, and drops the site down. The query is pasted further down this mail.
After manually changing the query to use IN(tid, tid2, tid3...), and getting rid of many LEFT JOINS, the query ran without any problem, and quite fast.

I'd appreciate pointers to issues regarding this problem, if you know of any...

Referenced By Filter

amitaibu's picture
public
amitaibu - Thu, 2007-10-04 09:06

Hi,

Updated: http://drupal.org/project/ReferencedByFilter


the guys in gizra.com (not yet launched) have written a module that filters the content by what is referenced from a specific node reference field (i.e. back link).
I've attached a ZIP of the module, so people go over it, enjoy it and give some feedback.

After enabling the module, there will be added in the Views> Argument> Referenced by a certain field.

An older version of this module included a patch for the views, but this is no longer needed.

Cheers,
Amitai


Getting started working on Views 2

merlinofchaos's picture
public
merlinofchaos - Sat, 2007-09-29 02:20

Since there is no UI, you need to build Views 'by hand'. This is doable. This is a test module I'm using which, I hope, demonstrates how views can be created, saved, loaded, built, executed and rendered.

Because g.d.o has a markdown syntax that totally interferes, the snippet is here: http://www.angrydonuts.com/node/150


Views Slideshow

aaron's picture
public
aaron - Sun, 2007-09-23 22:18

I just added a new slideshow mode to the Views Slideshow module. You can see a demo at Drupal Hub. It uses JQuery and views, so any type of view could be made into a slideshow. The current modes are single frame, as seen in the left sidebar of the demo page, and with 'thumbnails' as shown on the content of that page.

I also revamped the themes for it, making it easier to theme specific elements of the slideshow.


Views UI mockups

yoroy's picture
public
yoroy - Sun, 2007-09-23 18:41

Hi. I'd like to document some links to Views2 UI mockups here. Links to the files have been bouncing around in IRC, maybe this can be a place for further thoughts on how Views2 could best present it's functionality to the user. I'll be updating any new screens here.

These all concern the “create new view” part of the UI, looking for ways to present all the available settings in a more compact layout.

first:
- views2-merlinsmockup.png


Project* roadmap for D6

public
dww - Tue, 2007-09-18 08:38

Now that Drupal 6 is out, getting the project* family of modules ported to D6 is going to become an urgent task. We want to ensure that by the time the final release candidates are out, we're ready to upgrade drupal.org to D6 (which must happen before the official 6.0 release is possible). That's going to take a lot of effort, and hunmonk and I have some very specific plans for how it should all happen. This page will be the place to keep track of what has to get done, in what order, so that anyone who wants to help knows where to put their efforts. It's obviously a work-in-progress, so feel free to help keep it updated, add issue links where appropriate, cross off things that are completed, or add other steps that need to happen.

I'm cross-posting this to a lot of groups since: a) converting project* to use views is a big part of this effort (so we have significantly less code to support in project* and port to newer versions of core), b) since we need lots of volunteers/help, and c) in case anyone is able to help sponsor some of this work to ensure that everything is completed well before the core maintainers would like to ship 6.0. Thanks!

Redefine what's considered a core module

catch's picture
public
catch - Sat, 2007-09-15 11:40

So Drupal 6 has been the first release cycle I've been involved with on any level, did a few reviews and submitted some very small patches, and followed a lot more as they went in or didn't. The overriding feeling I've got from it is that the division in core between api and cms-type modules is causing problems that are increasingly hard to deal with.


Syndicate content