Author Role Argument
Owen Barton - July 16, 2007 - 21:21
| Project: | Views |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
This patch adds a new argument ' Role: Author Role' that means you can have views like 'myview/staff' to (for example) give a listing of staff blog posts.
I have tested it out and it seems to work fine (including summaries), but this is the first views arg I have written, so someone should check it over :)
I took the liberty of replacing spaces in the links with '+' symbols, which is nicer than the %20s you get with 'real' spaces.
| Attachment | Size |
|---|---|
| views_role_arg.patch | 2.28 KB |

#1
Using Drupal 5.1 here's what I did to apply this patch and get it working:
(Using Views module 5.x-1.6)
1. Disable Views and all dependant modules
2. Uninstall Views (Administer > Modules > Uninstall)
3. Download and apply the patch (linux shell access)
cd modules/views/moduleswget http://drupal.org/files/issues/views_role_arg.patch
patch views_user.inc views_role_arg.patch
# (patch applied message)
4. Administer > Modules. Enable Views module. Enable Views UI module.
5. Administer > Views > Add. Goto Arguments section. Expand Add Argument select menu and you should see "Role: Author Role."
#2
Setting correct version.
#3
Correcting title too (I wonder how the version changed?...is was entered as 5.x, and there is no change in the comment log...)
I can update this patch for 6.x if you would be interested.
#4
It was probably entered for HEAD which did eventually change to 6.x-2.x.
Views 2 for D6 already has a role argument, so no need to roll this for that.