Read full tutorial at http://webwash.net/v-a4
Module: Talk (http://drupal.org/project/field_collection)
By: Ivan Zugec (http://twitter.com/zugec)
In Drupal 6 fieldsets allowed site builders to group form items together. If a client asked for the ability to attach extra supporting data to a content type, you were stuck creating another content type and then create a relationship between both types using a node reference field. In Drupal 7 you would simply create a field collection for the supporting data.
---Full Transcript---
Hello and welcome to a short screencast on using the Field collection module in Drupal 7
For a detailed tutorial on using Field collection, go to the link below.
Field collection allows you to add a collection of fields to any entity like nodes, users and taxonomy terms.
It'll make more sense if I simply demonstrate what the module can do.
Let's say for example, you have an article content type and would like to attach the author's first and last name to each article like so.[Show example field colleciton]
How would you do this? You could write a custom field or you could create a field collection field.
Using field collection is pretty straight forward. If you know how to attach and manage fields on a node, than you'll be able to understand how field collection works.
Now we'll create a field, so follow along if you like.
First, start off by going to a content type and create a field collection field like so.
We'll call the field "Authors".
And select "Field collection" as the field and "Embedded" as the widget.
Then, click on "Save".
On the field edit page, select "Unlimited" as the "Number of values" then, click on "Save settings".
Right, our field has been created, next let's go ahead and attach some fields to the field collection.
To add fields to our new field collection, go to "Structure" then click on "Field collections".
Our field called "field_authors" now appears here, because we just created the field.
To attach fields to our field collection, just click on "manage fields". And add fields the same way as if you were adding them to any content type.
Continuing with our example, we will need to create a first and last name field.
Go ahead and create a "First name" field.
And Select "Text".
Next, create a "Last name" field.
Now let's test our field.
Go to "Add content" and click on the content type.
There you can see the new field.
Now, add some authors.
And there are the authors.
Finally, Field collection also allows you to add, edit and delete individual collections directly from the node view page.
Thank's for watching and don't forget the check out the detailed tutorial at webwash.net
Показать еще
7 авг 2013
Присоединяйтесь — мы покажем вам много интересного
Присоединяйтесь к ОК, чтобы посмотреть больше интересных видео и найти новых друзей.