Sign in to your OlinData support account for customized help. Once you login you will be able to contact our support engineers (for 24/7 support packages), register your issues and view the history of your support cases.
How to Add Content to a basic Drupal Site – Musings of a Drupal Girl
Alright, let’s get down to business (cues the song from Mulan)! In my previous post, I did a whole guide on how to install Drupal for local development the super easy, 101 way via Acquia Dev Desktop and local host.
Now that we have that installed, it’s time to play with your basic Drupal site! As with every website, content is one of the most important things you need. So for this post, let’s get started and learn how to add some content to a basic Drupal site!
I am only just a beginner in Drupal so I might not be able to explain everything right now, but I will try to do so to the very best of my ability!
To make things easy, I chose to go to my site via the Acquia Dev Desktop way. If you have forgotten how to do it, here is a quick recap:
Click on “Go to my site” and you will get to your login page. I hope you haven’t forgotten your login details! Sign in and voila, you are in.
When you click on “Add Content”, you will get 2 default basic content types.
The Article content type (formerly known as “story”) is used to add content such as news or information – content that is updated/added more frequently. Articles can be cross-referenced and categorised, and are usually sorted with the most recent post at the top; although this can be customised with contributed modules, e.g. Views, but we will go into that another time.
The Basic Page content type is typically to create pages that have static content (meaning you don’t change it often). These are usually linked to the main navigation bar but are certainly not required to.
Other Content Types & Users
Yes, you can add other content types such as forms or polls, and you can also have multiple users for one website (just like WordPress). Of course, this is more in-depth and we will cover other content types as well as users in subsequent posts. If you would like a little read about users, check out Richard’s take on it as he builds a website.
Filing up your Article content type is rather easy. The “title” is self-explanatory. The “tags” below that is what Drupalists call “taxonomy”. As our Drupal expert Richard explains in his post about taxonomy, it is basically classifying your content with organisational keywords. It is the same as “tags” in WordPress and allows you to connect, relate and classify your website content. Of course, you can choose to add an image to your Article if you wish to.
The “body” is where you fill in your main content. If you look at the bottom of it, you’ll see 3 different text formats you can use: “Filtered HTML”, “Full HTML” and “plain text”. There is a guide there that you can use to see which format is the best for you. Personally, I know some HTML so “Full HTML” is what I like so that I can customise the look of my “body” text.
Next to the word “Body”, you will find a link that says “Edit Summary”. When you click on this, a new box for a Summary will appear.
What this means is that you can create a Summary of your Body text in the Summary box. This is similar to a meta description. If you do not wish to fill this part up, no worries. Drupal will just take the first paragraph or so from your Body text and use it as a Summary.
Now the bottom part before you click “Save” or “Preview” can get a little tricky, so let me explain it one by one to help us all out.
For “Menu settings”, the default setting is to not a provide a “menu link”.
A “menu link” is for connecting your content type to the main navigational bar, aka your menu, which makes it more like a page. As you don’t really do this for the Article content type and leave the “Menu settings” as its default of no menu link, I will explain more about this when we touch on the Basic Page content type below.
This option is of a higher-level and is more complicated, which I may touch on much later in this series (I gotta learn it too!). But for now, do just leave it as it is.
URL path settings basically mean the URL for your Article, e.g. “http://www.MyDrupalSite.com/content/MyFirstArticle”. The main default as shown above is to “Generate automatic URL alias” which means Drupal will automatically create a URL for your Article based on your Article Title. In this case, it will be “content/welcome” as my title is ‘Welcome’.
If you uncheck this, you will be able to create a custom URL for your Article so it’s entirely up to you. With Article content types that have a very long title, it is certainly helpful to create a custom URL where you shorten it to what you want if you wish to.
This is pretty self-explanatory.
You can choose whether or not you want others to comment on the posts you make. Of course, commenting cannot happen until you finish your local Drupal site and actually put it online, which may be covered later on (a Google search has indicated the level needed to put it online!).
Authoring information lets you customise the name you want to post under. Subsequently, as you develop further, you may have more users on your Drupal site (e.g if you have multiple contributors/collaborators) and you can choose to post under their names instead of your own.
You can also choose a specific date and time that you want to show as the the date/time you posted this Article.
There are 3 options here for your ‘Publishing options’:
You can choose whether you want to publish your Article right away or leave it as a draft. Uncheck this box if you want to leave it as a draft.
Promoted to front page
Checking this box basically means that this Article will show up on your front page, aka your home page.
Sticky at top of lists
A “sticky” means that this Article you are about to publish/save will be on top of all your lists, e.g. forum lists, front page lists.
And that’s pretty much the basics of how to add the Article content type to your basic Drupal site! Save your awesome first post, and you’ll get something like mine:
[In case you're wondering, I didn't provide a menu link, went with the default for Revision information & URL path settings, allowed comments, left the Authoring information as default as well and set my Article to "Published" & "Promoted to front page".]
Just like the Article content type, you have your Title, your Body and the option to include a Summary about the page.
You also have the same “Text format” options and the same options before you publish, as per the Article content type. Now let’s go into them one by one to see how different it is from the Article.
For “Menu settings”, the default setting is to not a provide a “menu link”.
A “menu link” is for connecting your content type to the main navigational bar, aka your menu, which makes it more like a page. As you now have a Basic Page content type (this can be called “About”, “Contact”, “News”, whatever you would like as per the website you intend on creating), you want it to be added to the navigational bar so that it will be like other websites that have “Home”, “About”, “News”, “Contact”, etc.
So check the box, and you will get this:
Menu link title
This is basically what you want to call your Basic Page in the navigational bar. For example, the title of your Basic Page is “About My Company”, it is a little too long for your navigational bar so you would just put “About” for the ‘Menu link title’.
What happens when you save it later, is that your navigational bar will show “About” while the title in your window will show “About My Company”, like this:
The description is shown when the cursor (aka your little mouse arrow) is hovered (aka placed over) the Menu link title [geez, talk about tech terms, huh?], like this:
There are 2 options under Parent item.
1. Main menu
This is the default setting. By selecting this, your Basic Page will appear in your navigational bar.
As you add more Basic Page content types, there will be more of these options “–Basic Page”. Selecting this option means that your Basic Page will be added as a sub-menu item, which will be explained in subsequent posts.
For now, as this is a basic guide on how to add content to your basic Drupal site, we will go with the default setting of “Main menu”.
‘Weight’ matters for the organisation of Basic Page content types in your navigational bar. If you leave it as the default 0, it means that the Basic Page you just created will be the first tab in your navigational bar:
Of course, as we all know that “Home” comes before “About” (unless you really choose to be unique, although I wouldn’t suggest this), we need to change this and we go about it by changing the ‘Weight’. By changing the weight to ’1′ (a positive digit 1), this will let “About” come after “Home”:
And tadah! “Home” now comes before “About”, showing you what ‘Weight’ is all about.
As mentioned above, this is of a higher-level, which I may touch on much later in this series but for now, do just leave it as it is.
Like the Article, URL path settings basically mean the URL for your Basic Page, e.g. “http://www.MyDrupalSite.com/content/MyFirstBasicPage”. The main default as shown above is to “Generate automatic URL alias” which means Drupal will automatically create a URL for your Basic Page based on your Basic Page Title. In this case, it will be “content/about-my-company” as my title is ‘About My Company’.
If you uncheck this, you will be able to create a custom URL for your Basic Page. As I find “about-my-company” a little too long for the URL of an ‘About’ Page, I’ve unchecked the box and created my own URL:
For a Basic Page, you certainly don’t want others to comment as it is mostly static content so it’s best to your ‘Comment settings’ as Closed:
Authoring information is also the same as the Article content type. It is up to you to choose whoever you wish to place as the author (when you have more users) and the time/date you wish to have others see as your posting time/date.
We’re almost done! For ‘Publishing options’, all you have to do is choose whether you want your Basic Page ‘Published’ or not as it will already be on your navigational bar, so you don’t need it promoted to the front page or as a sticky.
*drumroll* That’s pretty much the basics of how to add the Basic Page content type to your basic Drupal site! Save your awesome first Basic Page, and you’ll get something like mine:
So there we go: How to add content to your basic Drupal site using the default “Article” and “Basic Page” content types. As mentioned, there are many more content types you can add, but we will go into that in subsequent posts.
This guide is also available on Slideshare for easy download!
I hope that was simple enough for you to learn how to add some basic content. For my next post? Well I’m still trying to figure that out right now. Any suggestions? Would love to hear from you about my “Add Content” guide. Just drop me a note at firstname.lastname@example.org. Till my next post!