Closed (fixed)
Project:
DraggableViews
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Apr 2009 at 09:25 UTC
Updated:
19 Aug 2009 at 10:00 UTC
Thanks for the awesome module :)
One question - The current order values are for the entire view, not per parent:
-Parent 1
--Child 2
--Child 3
--Child 4
-Parent 5
--Child 6
--Child 7
--Child 8
Do you know of any way I could generate unique order values per parent, such as:
-Parent 1
--Child 1
--Child 2
--Child 3
-Parent 2
--Child 1
--Child 2
--Child 3
I'd like to use DraggableViews to set priorities and dependencies, but need a way to make things more unique.
Thanks for your insight!
Comments
Comment #1
sevi commentedWell, you can calculate the value per parent: child_per_parent = child - parent.
Probably this could be a views field, provided by an optional sub-module of DraggableViews.
I'll look into this shortly.
Greetings,
sevi
Comment #2
brendon commentedI would be interested in this as well. Has there been any progress?
Comment #3
sevi commentedNot yet.
There's a hook that gets called every time the view is themed.
In $info['nodes'] you'll find all calculated values (depth, order, parent,..). With these values you can calculate the special-order-values you need.
It may be useful to provide a hook that gets called every time the hierarchy was built. So the values you need can be calculated and saved to the database (in pairs {nid, special-order-value}) before the view gets executed.
Another idea:
Would you need the structure to be valid even if the view gets only executed (and not rendered)?
Greetings,
sevi
Comment #4
sevi commentedI created a new module for stuff like this.
If needed re-create this issue at DraggableViews Navigator.
Greetings,
sevi