Are there plans for a Drupal 7 version of this module or does Views 3 include those little helpers per default? I'm asking in particular for the Views Argument Sort.

Comments

drupa11y’s picture

subscribe

e2thex’s picture

I am not sure if this whole thing is going to port to 7 but I do think i will be working on the arg sort

e2thex’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Ok I now have 7.x version

It has the field default arguments and the sort

Note there was lots of renaming (no longer called cck and such)

thomas4019’s picture

I can't seem to get the "Multi-item argument order" to work.

For one, it seems the following line needs to be added to the info file. Without it, Views just says "broken/missing handler".

files[] = views_sort_by_arg_order_handler_sort.inc

After adding that line, the options form is never presented and the overlay times out.

thomas4019’s picture

It's timing out because of the error

Call to undefined function views_process_dependency()

Looks like the forms api code needs to be moved from dependent system to the new Drupal 7 states system, http://randyfay.com/states

e2thex’s picture

Ok looking now, should have a new commit shortly

e2thex’s picture

I had missed the updates to the sort with the first branching

they are in dev now

commit 4fc3a30b32618c489eb2cb329d2a9f2d7294e34e
se: Fri May 27 14:56:26 2011 -0400

Updating view_sort_by_arg_order_handler_sort for d7

e2thex’s picture

so the last one did not get pushed
but now it is pushed in the commit
commit 2c59451b4fef8b7b46eaba886baa2b4e2bc257f4
Author: Erik Summerfield
Date: Thu Jun 2 15:50:18 2011 -0400

Updating view_sort_by_arg_order_handler_sort for d7

bartclarkson’s picture

Hi e2thex.

This module is incredibly useful. I use it to give advanced content managers exacting control of views handled through panels. Use/Move this post as you will.

I just wanted to share an important tidbit for others looking to create a multiple argument programatically in Views as a default argument.

When using the PHP Validator textarea, the key to getting the Sort Criteria to work with your PHP-driven argument is to attach it to both the handler and the view directly.

$myArgument = 1+2+3;
// This line for sorting.
// Note if you need to preserve another argument you must key this array by argument order.
$view->args = array($myArgument);
// This line for filtering.
$handler->argument = $myArgument;
return TRUE;