Quantcast
Channel: OlinData - acquia
Viewing all articles
Browse latest Browse all 16

How to Add Content to a basic Drupal Site – Musings of a Drupal Girl

$
0
0

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!

Starting up Acquia Dev Desktop

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:

Starting up Acquia Dev Desktop

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.

Signing in at your site

Add Content: Basic Content Types

When you click on “Add Content”, you will get 2 default basic content types.

2 types of basic content

Article
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.

Basic Page
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.

Creating your first Article

Creating your article

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.

Body

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.

Creating your article - body & summary

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.

Menu settings

For “Menu settings”, the default setting is to not a provide a “menu link”.

Creating your article - menu settings

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.

Revision information

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.

Creating your article - revision information

URL path settings

Creating your article - URL path settings

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’.

Creating your article - URL alias

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.

Comment settings

This is pretty self-explanatory.

Creating your article - comment settings

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

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.

Creating your article - authoring information

You can also choose a specific date and time that you want to show as the the date/time you posted this Article.

Publishing options

Creating your article - publishing options

There are 3 options here for your ‘Publishing options’:
Published
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:

First article created!

[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".]

Creating your first Basic Page

Creating your basic page

Just like the Article content type, you have your Title, your Body and the option to include a Summary about the page.

Creating your basic page -title, summary, body

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.

Menu settings

For “Menu settings”, the default setting is to not a provide a “menu link”.

Creating your basic page - menu settings

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:

Creating your basic page - menu link

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:

Creating your basic page - menu link title

Description
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:

Creating your basic page - menu link description

Parent item
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.

2. –Home
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
‘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:

Creating your basic page - weight

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”:

Creating your basic page - changing weight

And tadah! “Home” now comes before “About”, showing you what ‘Weight’ is all about.

Revision information

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.

Creating your basic page - revision information

URL path settings

Creating your basic page - URL path settings

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’.

Creating your basic page - URL alias

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:

Creating your basic page - change of URL alias

Comment settings

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:

Creating your basic page - comment settings

Authoring information

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.

Creating your basic page - authoring information

Publishing options

Creating your basic page - publishing options

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:

First Basic Page created!

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 nicole@olindata.com. Till my next post!


Viewing all articles
Browse latest Browse all 16

Trending Articles