0

I have a content type with an imagefield and a link field. Each of those fields accepts four values; so the user uploads four images and types four URLs in each node.

I want to use Views to create a block based on that node that displays the first image linked to the first URL; the second image linked to the second URL; etc. I don't want to use CCK 3 with Multigroup (if possible) because it seems to sometimes cause weird behavior in Views, Contemplate, etc.

Given the existence of Delta fields, "Group multiple values", etc., it seems like this should be possible. But I can't make it work. Is it possible? Or should I bite the bullet, use CCK 3, and hope it's not confusing as all get-out?

1 Answer 1

1

You shouldn't use delta for such thing as data sometimes get reordered in the tables (ex: for node reference, the nid gets reordered regarding the title of the node referenced).
So I'll recommend you to create 4 fields for images and 4 for the URL and eventually put them in groupfields.

Also to make things prettier you can theme your form and put each group of field in a row using div or table.

Have a look at Theming Forms in Drupal 6 for information regaring form theming and the official documentation: The theme registry for special cases.

Another nice tutorial: http://www.akchauhan.com/theme-drupal-form/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.