Drupal Tutorials #8 - Creating a Content Type

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
yo what's up this is Scott with the level up tuts and today we're going to be doing your own custom content type in Drupal so last time we showed you how to create an article and the time before that we showed you how to create a page and this time we're going to show you how to create a content type so that you can make up your own types of content and this can be extremely useful since this is going to be my portfolio site I'm going to have different projects I'm an important here and these projects are going to have all sorts of stuff from images to video links and it's going to have to take some different types of media we're not going to get into adding those types of media or those those custom fields yet because those are going to require some modules that will show you a little bit later but for now we're going to get in by just in creating at your own content type and we'll show you how flexible that is so that you can get working building your own custom content types to build out your site's content with if it doesn't fit the mold of their defaults so we're going to go to structure and then structure there's a item called content types actually I'm going to click this plus here to add this to my shortcuts bar because I'm going to be using this a lot in the initial development of this site so it's up here now and as you'll see here's your article and basic page we can actually modify article our basic page by adding some fields or editing them however for now it's just going to be easier to show you how to start from the beginning so to get started we'll click add content type we're going to call this project my projects so this description doesn't really show up anywhere other than in the administrative section it's nice if you're building the site for clients and you have a bunch of different content types let's say they have a news posting and you know there's news or or events or something like that and you want to give them even more clarification besides just what the name is what its function is on the site so here you know that's where you add your description so the title field by default is title I'm going to leave this is title because it's the page title I don't change it very often but if you need to you can I'm going to leave preview before submitting is optional because you know if I want it I'll know it's there and if I don't I don't have to use it okay next we're going to go to publishing options the default will be published and I'm going to turn off promote a different page so the default is going to be published but I don't want every single post to automatically promote it be promoted to the front page when you're creating your individual pieces of content you can then select this promote it to the front page to whichever one specifically you want to be promoted to be promoted okay so publish is the only one I want by default if you were having a site where many people were sort of reviewing content and creating content and not always the person who creates it submits it and it goes live then you might want to deselect published so that when you create a piece of content it's not automatically up on the site but I'm going to be the only person making content here so I'm going to leave this as published ok display settings you know I don't I don't really need to display my the author or date information this will show up on the note itself and you know usually just gets in the way it's ended up turning it off so you know if you were making a blog post and you had a couple people making blog posts you know you could use that to distinguish who's making the posts but for this particular content type I'm not going to bother and comment settings I'm going to turn comments off I will eventually want to have comments on some of my project pages however I'm going to do that through discuss which is a web service that is very popular for adding comments and I'll be adding discuss with the module a little bit later but as far as Drupal's comment system goes I'm not going to use it for this so I'm just going to say closed and actually I'm going to turn it to hidden it's not even going to show up so menu settings this is when you create your content it asks you if you want to put it in a menu these things are not going to go into any menu in particular so I'm just not going to have any available menus for now eventually maybe you want to do like a site map or something I can put in that actually we will select the main menu because they're going to go under projects and I'm just not going to display them in the projects menu anywhere necessarily but as far as page structure goes they're going to live under the main menu projects so we'll leave that I guess and now we're going to save and add fields because without adding fields it's pretty much the same as a page so if you next stop is this manage fields okay so here as you can see it's just like your page you add a title and a body this body has the a field Awards a long text in summary and the widget is using a text area with a summary you can just delete this if you feel so inclined if you don't need this if you need to add a new field it's right here you can also add an existing field eventually when you keep creating fields it adds them to the existing fields since we haven't really created any fields our options are only field image and field tags which were available in the article so let's just add a new one and we're going to call this will have this be a type of project so I want this to be a term reference so I'm going to have different types of projects whether it's video project or web project and so I'm going to use taxonomy for that and so I'm going to use a term reference going to be referencing a taxonomy term or a category so I'm going to call this field and we're going to call this a type so field type and this will be project type so your field names are going to need to be machine readable readable as in no spaces lowercase letters and underscores only as far as this name the field name it can be anything you want because this is only pretty much displayed in the back end so we're going to say term reference and we want this to be an autocomplete term widget because these things are probably going to be one thing and if I have a whole bunch of different terms I don't necessarily want them to be check buttons because or checkboxes because that list could get really long okay so to add a new field you just have to fill out these forms if I wanted to appear above the body which I do because you know usually I want to select what type of project it is before I start writing the body text I'll drag it above here and now we're going to click Save and it's going to say widget okay I believe you want to use since we haven't created any vocabularies yet yeah we'll use tags so I'm going to click this Save Settings okay this is your field settings so this is asking me all sorts of stuff in here you know label where da had that you can give it some help text you can give it a default value you can say how many values you wanted to have we just want this to have one values we're going to select one is et can be unlimited and this is where you can also select what vocabulary it's using so we're selecting tags and we're going to save this okay so now we have our content type if we back out of here and we go to add content you'll now see that project shows up as an hop as a content type we'll type in title just do my first project just to try it out and this is going to be a video okay in the body body text and we're going to put this under the and main menu but oh actually we'll just skip this for now because we don't have a projects page yet we're not going to create every vision we're not going to worry about URL aliases right now and it's going to comments going to be closed as they are by default and it will be published we'll click Save and here we are as you can see it automatically lists your body text your project type in your video in the next lesson we're going to be going over how to use manage display to work with these labels or work with this layout here once again this is Scott with level up tuts if you have any questions please leave a comment it hits up on Twitter I level up tuts feel free to check out any other series going on right now we have a compass and sass series we have an expression engine series going on and we're going to be starting a wordpress series really soon so feel free to let us know what you're thinking once again this is Scott with level of tuts and thanks for watching bye
Info
Channel: LevelUpTuts
Views: 90,253
Rating: 4.9047618 out of 5
Keywords: Drupal, Tutorial, software, tutorial, Data, Technology, Business, System, Management, Training, Systems, Information, Computer, Design, Using, xampp, drupal7, installing, level, up, tuts
Id: bmWPYQEZzvQ
Channel Id: undefined
Length: 9min 24sec (564 seconds)
Published: Thu Mar 22 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.