Hi, I would like to be able to retrieve a CCK field data from it's table using a url, much like you can find a node by it's node id. The problem is that there doesn't seem to be a unique id for a cck entry.
I tried adding an auto increment field to the CCK table for that field, only to find out that when you use a form to edit a node with cck fields, the cck fields in the table are not updated! Instead, it seems like CCK removes the rows, copies them, then reinserts them in. I think this has to do with the delta column since you can rearrange the order of the cck fields.
So long story short, is there a way to uniquely identify a cck entry even when you updated it's content? Any ideas would be appreciated!
Thanks,
burnside
Comments
Not sure what you are after,
Not sure what you are after, fields are part of nodes, the nid plus delta already uniquely identify a field.
That's what I was thinking
That's what I was thinking too, but let's say you drag a cck field below another. That changes the delta of that field.
So if I first was looking for the value of a cck field with node=45 and delta=0, after dragging that field down the delta changes to delta=1 and the field that was delta=1 now becomes delta=0. So now if I once again ask for node=45, delta=0, I get the wrong content. I want to be able to track the content of a cck field without having to remember that it's delta changed.
Probably not easy as fields
Probably not easy as fields are not really designed to be tracked independent of the node.
No problem. Found a way to
No problem. Found a way to do this in the end. :)
hello, how did you accomplish
hello,
how did you accomplish this?
thx
w
What was your solution?
Would be helpful to post a solution to your question as you found one as this shows up in searches - it's a bit frustrating!
CCK Field ID Sandbox Module
In case anyone is still looking for a solution to this problem (I was!), I have created a module which assigns IDs for CCK fields and keeps track of field re-ordering in multigroups. See: http://drupal.org/sandbox/neilt17/1990116.