The attached patch reshuffles the view options a bit to make Token support optional. It allows the argument handling to be 'none' (allowing Views' normal argument default code to take over), 'nid/uid' (passing in the nid or uid of the object being displayed), or 'token' (equivalent to the current system).
It only shows token options when that mode is selected, and degrades gracefully when token isn't present. It's a bit cleaner and a bit more consistent and it means one less dependency for the "super simple" cases where someone just wants to stick something on the user profile.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | views_attach_optional_token.patch | 14.23 KB | eaton |
| views_attach_optional_token.patch | 14.23 KB | eaton |
Comments
Comment #1
eaton commentedAfter some careful thinking I changed the default options -- node content views now default to the 'nid' behavior and profiles default to the 'uid' behavior. Token is an option if token module is installed. This mirrors the 1.x behavior.
Comment #2
eabrand commentedI didn't have any problems with it. Seems like a great patch!
Comment #3
niklp commentedSubscribe, cos AFAICT the patch won't apply against dev.
Comment #4
eaton commentedCommitted with Crell's blessings to the dev branch. Will do some additional testing before the 2.1 release is rolled.