A D7 version of this handy little module would be great!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tebb’s picture

Title: D7 port? » views_arg_context: D7 port

Subscribing.

Shadlington’s picture

Subbing

mattsmith3’s picture

sub

that0n3guy’s picture

+

baldwinlouie’s picture

FileSize
3.35 KB

I just updated this module for one of my projects. Attached is a working D7 patch.

The readme and the default views that is included were not ported. Feel free to modify this patch.

xjm’s picture

Status: Active » Needs review
davidseth’s picture

Ok, got it working. Now to do some tests... Thanks for you patch!

Adam S’s picture

subscribing

Adam S’s picture

FileSize
4.51 KB

The argument plugin options form need a little work. First time I created a patch so let me know if it doesn't work.

Adam S’s picture

FileSize
4.51 KB

From the looks of it that last patch is backwards. Lets try this again. (Ah, yes, the preview button :)

baldwinlouie’s picture

Status: Needs review » Needs work

Hook_nodeapi is not part of d7 anymore. It has been replaced by hook_node_view and some other hook functions. I also added a convenience function for hook_user_view

Also what's the modification to the argument form?

Thanks for the patch!

Adam S’s picture

Also what's the modification to the argument form?

The '#dependency' property does not exist in Views 3. It might have something to do with the ctool ajax framework moving to Drupal 7 core. So the argument options are defined in function option_definition().

Adam S’s picture

There was a problem with the taxonomy_node_get_terms() not existing in Drupal 7. Based on this thread, http://drupal.org/node/909968, I just went ahead and added the function to views_arg_contect.module.

You still need to know what the namespace and attributes are which can found at the bottom of the vews_arg_context module. It should be self evident how to use them.

It is working great for me. For taxonomy arguments in Views you need the Content: Taxonomy terms on node in relationships and Content: Taxonomy terms on node in Contextual filters. under the contextual filters choose -> provide default argument -> active context -> namespace: taxonomy -> attribute: tids-or. Then click more and click allow extra values. Because multiple terms will repeat results use the query settings to set to distinct.

I would love to get some testing and feed back on this.

xjm’s picture

Status: Needs work » Needs review
yareckon’s picture

sub

jonathan_hunt’s picture

This looks promising but I can't apply the patch:

patch <views_arg_context-drupal-7.patch 
patching file README.txt
Reversed (or previously applied) patch detected!  Assume -R?
Adam S’s picture

FileSize
46.17 KB

Here it is in a zip file. I use it on a live D7 site.

xjm’s picture

See also #1278982: Add xjm as maintainer or co-maintainer. If I get access to this project, I'll open a D7 branch with #17.

xjm’s picture

Status: Needs review » Fixed

Opened 7.x-2.x branch, committed and pushed #17, and created a release node. A dev tarball should be available within 24 hours. Thanks to brynbellomy for super-fast turnaround on the maintainer access!

http://drupal.org/commitlog/commit/13216/9ff7eb577e6ec08f72d5466c586df28...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.