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.

Rosamunda's picture

Views Calc not working

I´ve recently installed views calc (I´ve got last stable release of views and cck), and got a nasty error:
warning: Invalid argument supplied for foreach() in .../sites/all/modules/views_calc/theme.inc on line 160..(*)
But, sometimes, randomly, the error won´t appear, but the view won´t work either.

I´ve look for that error at the forums, and found nothing.
I´m attaching the strange and totally random behaviour of Views Calc as a png. It should show the sum of the one column with the prefix $.

Read more
jeff00seattle's picture

hook_view_draw(): Trick it to add input fields?

Hi

I am just curious if there is a way of tricking the items array returned from hook_view_draw() whereby some of the array elements do not reference a field within a table in a database, but actually a input like a button?

For example using users table, generate a view from a custom hook_view_draw() the following:

Sortable Sortable
[User ID 1][User Name 1][Update Button for User ID 1][Delete Button for User ID 1]
[User ID 2][User Name 2][Update Button for User ID 2][Delete Button for User ID 2]

Read more
ocirs's picture

Dynamic Date Range Filter

Hey Guys,

I'm trying to change the date filter for one of my views dynamically so I can output a set of nodes from a fixed time frame depending on the views argument. For example, if the argument date is 2-19-09, I would like the view to display all nodes created between 2-10-09 to 3-10-09. I wrote the script to calculate the min and max date for the view, however, when I try to set those parameters and display the view the date range limit is not applied.

Read more
Taz's picture

Contextual Views

I'd like to seed a discussion on Contextual overrides for views 2 module, a possible extension to the Interests module (Which i originally developed while working at Agileware and still partly maintain). I would also like to point out contextual based modules already exist, but they are not what this module has in mind.

To give some background on the idea...

Read more
somebodysysop's picture

'extra' field in hook_views_data()?

In hook_views_tables, I used the 'extra' field to make sure that when my table was used in a view,it ony used records which matched the current group. i.e.:

<?php
  $tables
['og_users_roles'] = array(
   
'name' => 'og_users_roles',
   
'provider' => 'internal', // won't show up in external list.
   
'join' => array(
     
'left' => array(
       
'table' => 'node',
       
'field' => 'uid'
     
),
     
'right' => array(
       
'field' => 'uid'
     
),
     
'extra' => array(
       
'gid' => '<strong><em>CURRENT_GID</em></strong>'
     
),
    ),
?>
Read more
gopagoni's picture

how can i add group by

HI,
I am new to drupal.I have an issue with views.
How can i add group by clause to views.
when i used "function add_groupby" ,it is adding group by by grouping all fields in the query.

SELECT state_downtimes.down_id AS down_id, state_downtimes.reason AS state_downtimes_reason, state_downtimes.startdate_planned AS state_downtimes_startdate_planned, group_concat(title separator ' ,') AS title
FROM state_downtimes state_downtimes

LEFT JOIN service_downtimes service_downtimes ON state_downtimes.down_id = service_downtimes.downtime_id

Read more
jbatista's picture

Chosing name for Theme file Views

Hello people and thank for the help in advance.
I'm creating this thread because i have a problem theming views.

I would like to use the same template file for views with diferente names.

For example:

View_A  -> template_file_view_ab.tlp.php
View_B  -> template_file_view_ab.tlp.php

View_C  -> template_file_view_cd.tlp.php
View_D  -> template_file_view_cd.tlp.php

Does anyone knows how to do it?

Thanks in advance.

Read more
dale42's picture

Wanted: Your Devel/Troubleshooting Tips

I'm writing a Views 2 argument handler for a module I maintain. Steep learning curse, though I've made some progress. I'd love to hear any wisdom you've accumulated working on Views 2 handlers and plug-ins. Especially around troubleshooting/bug tracing strategies. Reference material also appreciated.

Read more
chrisrikli-gdo's picture

Select fields as exposed filters rather than text input fields

Is there a way (aside from using hook_form_alter or something similar) to have an exposed filter be a select element?

I have a view in which one of the exposed fields is "Category" and there are only 9 or 10 distinct values in the database field. Rather than having to type in one of the categories, I'd like for users to simply choose from a select box.

Read more
IbnDrupal's picture

Explicitly ordering a view before rendering

I have a view that selects several nodes by certain sort criteria, say date. Some of these nodes have been labelled sticky.

I would like to reorder the list so that the first sticky appears at the top of the view, and the remaining nodes remain in date order.

Is this possible?

I've tried doing this at the template level but have no idea how to, and I don't think creating a sort handler will help as i'm not sure how I would create such a query.

Any help would be much appreciated.

Read more
chrisrikli-gdo's picture

Getting node data from a 'user' view

My apologies if this question should belong in either the OG or CCK groups; this seemed to me to be the appropriate place to ask since the core of my question relates to creating a View.

I have a node type "Accounts" that is an OG node. "Accounts" has one CCK user-reference field added.

I have a node type "Transactions" that is an OG post, intended to be posted only to the OG "Accounts." Transactions also has one CCK user-reference field.

When I create a "Transaction" (the OG post) I want to have checkboxes displaying only the users referenced by the "Account" (the OG node).

Read more
kirilius's picture

Is it possible to have a single filter on multiple fields?

I have a content type A, that has let's say the following fields:
A->title
A->name
A->place_of_birth
I also have a taxonomy enabled for that content type (let's say called "Category")

Is it possible to build a view with a SINGLE exposed filter that will return all nodes that contain the search string either in the title, or in the name, or in the place_of_birth or in the category?

Read more
dragonwize's picture

Help shape a Content Types and Views book

I am currently in the very beginning stages of writing a book on Drupal Content Types that will focus on Core, CCK, and Views. I have a first draft of the outline that I am working on. I would love to get community feedback to help shape the book at this very early stage.

http://alanio.net/blog/2009/02/first-draft-drupal-book-outline-content-t...

Thank you,
Alan

Read more
KeyboardCowboy's picture

TAC and Views RSS

I have a situation to which I have developed a couple of solutions. However, colleagues believe that we are still missing something. I could use any input the community can share.

Plaftform: Drupal 5.14

Data Structure
- We have a large amount of published nodes in the form of news articles, reports, etc.

  • Registered users purchase subscriptions and are given access to view the full body of certain nodes depending on what they have subscribed to. This is controlled through TAC.
Read more
shushu's picture

Translate argument title

When using Term argument the handler is views_handler_argument_string.
There, the title() is not being translated.
It is a very small fix to make it work, but of course "hacking" the handler is probably not a good idea.

What do you think should be the "right" solution ?
Create a new handler - views_handler_argument_translated_string - won't be enough, since I will need to change taxonomy.views.inc to point to the new handler...

Thanks,
Shushu

Read more
Chris Charlton's picture

Advanced Drupal Views with Victor Kane & Chris Charlton

Start: 
2009-03-15 10:00 - 13:30 America/Los_Angeles
Organizers: 
Event type: 
Training (free or commercial)

Victor Kane & Chris Charlton teach Advanced Drupal Views in Venice, CA.

LA Drupal resident members get a special $50 off (email for bulk ticket pricing).

Learn all the new concepts in the Views 2 module for Drupal, inside and out, even some object oriented design details to take back to work.

Learn about the new architecture in Views 2, learn Relationships, the new user interface, and become a master of the new multiple Display configurations.

TICKETS ON SALE NOW. Hurry, tickets will go fast! http://drupal-la-training-2009-march-15.eventbrite.com/

This workshop shows how you'll get the most out of display options like blocks and pages, plus how to theme your views with PHP templates. Take away masterful tips like how to embed views (meaning views within views), and some magical views that only a developer can love.

Read more
NickSI's picture

Potential improvemnts to query engine

Working with Views2 I've found two places where I had to patch query.inc. Not a nice solution really. So, I've described both problems below and hope somebody will tell me that there is better way to handle them.

Read more
tstoeckler's picture

Views in Core

The "Views in Core" page in the new Community Initiatives sector on drupal.org states that

it seems like the best thing to do is get "all or nothing" of Views in core.

I am interested in how the intregation of the current (Drupal 6) Views and core will happen. I'm rather sure the core committers will not just move the views folder from contrib into the the core cvs repository, even though that would probably be the least time consuming. Therefore a few questions arise:

Read more
Ariesto's picture

Best Way to Have Backlinks Update? "Search: Links to" argument

Quite a few people have been wondering why their backlinks don't update after new content is submitted. Researching other posts has shown that the reason is that the new content is not indexed in the search engine, and the views argument relies upon the index to create the backlinks list. This is why after running cron the backlinks list updates with the new content.

I thought that it might be nice to have a discussion about the best way to index these nodes so that the backlink function immediately works as desired.

Read more
Subscribe with RSS Syndicate content

Views Developers

Group organizers

Group notifications

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