On this Craft Cms lesson we'll import the remaining entries and categories from the previous Webflow course.
It has been the best investment I made in my design journey so far. I would consider myself a novice but I honestly feel like I've gained a genuine professional insight into the process of creating a high-level website.
I'm an early adopter of the KreativePro Masterclass, and I love how well put together it is. Neftali takes you through each step of the process from paper sketches to marketing all with fun visuals & clear instructions!
On this lesson, it's all about importing our entries and creating categories from our webflow database. So Craft allows us to do that using feed me. So what we need to do is start creating some sections for our movies. And our categories. So let's go ahead and create a new section called movies. We're going to make sure it's a channel because it's dynamic and let's not worry about the template yet.
We just want to create this and have it in our database. Right. So we know we have cast as a section. Now, all we need to do is create a field that relates to that entries called cast. So I'm going to create a group here called movies. We're going to just dump in all the fields that we think are going to be associated to the movie.
Right? So this first one is going to be cast and we're going to have the field type to be a entries field type. We're going to choose the source to be cast because that's the only one we need and we're not going to limit it because we can choose as many actors or directors as we want. Okay. Let's save that and create a new field.
We're going to keep it simple, the year field, and we can compare this with the webflow fields that we have. This is going to be a number field type, just going to skip ahead and add these extra fields. We want to create a description field or a summary field in this case, that's where the plot is going to go.
So we just created a plain text summary field here, and I added a couple of line breaks so that we can add multiple lines. When we see it on the layout. Notice back in our webflow, we have movie genras and we have game genras. We want to export those out. So we can have those handy and these ones are just simple titles they don't have much.
It's just the title and the slug. So if we go over to our settings and we click under categories, we can start creating our groups. So in this case it would be movies and game genras.
Let's go ahead and open up those CSV files just to make sure we have the correct information. So we have here, the tables looking good. I'm using tablecruncher is just a simple light way to see any CSV file on your Mac. And I can see here we have all the fields that we've brought from webflow genras, we have the cover URL, the summary and all the additional fields that we need.
Next up, I want to open up our server in transmit. We can simply drop in some of the CSV file, similar to how we did with cast. So we are just going to rename this CSVs that we just downloaded it. We're going to drop them into our web server.
The next step we want to do is create more Feeds, so we can copy the URLs from our server in Fort rabbit, and simply create new Feeds for the movie genras and movies. I'm going to just pull in here the movies.csv that we just uploaded, make sure that we go through the same process making sure the element type is entries section for movies, create new entries yep, and toggle off backup just because it makes it a lot faster the process.
We can see here, we have all 49 elements looks good and continue.
And notice that I don't have any fields right now. What we need to do is go into our sections and under entry types. We need to make sure we add in our custom fields. So we add it on the right panel. We can drag and drop these fields pretty quickly.
Once they are inside of our field layout, we can save that. And when we go back to Feed me. Those fields are now gonna be available for us to start mapping. Okay. So now we can see some of the content fields available. The first one is of course the cast, which is a multiple option. We can go and look for our cast and then we can also create new entries if they don't exist, which I think is really cool.
For the score, pretty simple, just the number, the summary, and summary, the trailer with the URL. And finally the year. Now, if we save and continue, it's going to just queue that up, it's not going to run the feed because what we're going to do is we're going to create a new Feed for the categories.
So once we have both the movies and genras ready, we just need to click run Feed. That will first create all the categories that we need.
The thing we forgot to do was create the movie genras custom field. So I'm just creating this custom field as a category. And we want to make sure we select the source to be the movie genra. We don't need to worry about that right now, but we can just click save. And all we have to do now is just map that custom field to our section.
So going to the movies entry types, and then we just want to add in the movie genra inside our field layout, just like that. Okay. So now that we have the fields. Assigned to the entry types of our movies. We can go ahead to our Feed me and make sure that we are mapping the movie generous field to the CSP that we have from webflow.
So we go ahead and select that. Now on the actual genra, we want to make sure we select the slug because the title on its own might be different because of the capital letter at the beginning. So we want to use the actual slug because it's a lower case and it's most likely that it's going to match correctly.
All right. Once that's done, we can go ahead. Save. Let's go ahead and click run the movies feed. It'll take a little bit. Once that process has complete it, we can jump to the entries and see all the movies have been added correctly. This is it. I think we're ready to move to the next lesson. We're going to take a look at components in Craft.
See you there.
Access our premium community including bonus tutorials, project files & weekly resources.UNLIMITED ACCCESS