To improve exportability of pages, it was helpful, if vocabulary settings could be exported with their machine name instead of the numeric 'vid'.
As far as I see, this should be the case in several contexts, arguments , ...
In the first comment I'll post the code for the 'term argument'. If the code fits the needs, I'd provide some rework for the other components too ;)
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | ctools-term-arg-machine_name-1542544-11.patch | 8.07 KB | thepanz |
| #7 | ctools-term-arg-machine_name-1542544-7.patch | 4.37 KB | jeqq |
| #5 | ctools-term-arg-machine_name-1542544-5.patch | 4.32 KB | Angry Dan |
| #5 | interdiff.txt | 4.48 KB | Angry Dan |
| #3 | ctools-term-arg-machine_name-1542544-3.patch | 3.83 KB | derhasi |
Comments
Comment #1
derhasi commentedAnd there's the first part of the patch ;)
Comment #2
tim.plunkettBegin with a capital, end with a full stop
Same as above, also use " Defaults to TRUE." at the end of the line instead.
Same as above
Is all this flipping needed if array_intersect is used instead?
Comment #3
derhasi commentedTim, I adjusted the comments, as u proposed.
The flipping is really needed, IMHO, as we need the values of the map to be returned, which are the counterpart of the input $args. In the case we use, array_intersect, we would have to flip the return array. In each case we get similar numbers of flips.
Comment #4
ousmaneo commentedTested !
Working patch makes possible exporting panels page taxonomy argument with machine_name instead of vids
Comment #5
Angry Dan commentedI've made some pretty big adjustments to this patch which should improve performance amongst other things.
Comment #6
jeqq commentedPatch from comment #5 works for me. Thanks.
Comment #7
jeqq commentedNotice for Taxonomy term template pages.
Notice: Undefined index: vids in ctools_term_context() (line 42 of /var/www/features/sites/all/modules/contrib/ctools/plugins/arguments/term.inc).
Comment #10
Angry Dan commentedI've had this working for ages now, can we get a commit please?
Comment #11
thepanz commentedUpdated patch, rerolled against latest 7.x-1.x release.
Added the same edits also to the "term_depth" plug-in (that ships with CTools)
Comment #13
japerryI'm not sure why you'd want a vid over a machine name anyway. Tested fine for me. I'm a little worried about legacy, but the checks in the patch seemed to work for me.
Committed.