nodes

Creating Custom Lists Using Nodequeue

The Nodequeue module is an incredibly useful module that allows you select individual nodes and place them in a list in whatever order you like. This lesson shows you how to create a new nodequeue, add nodes to the queue, arrange the queue and then add the queue to a view.

Note: Click the 'full screen' icon (to the left of the volume control) in order to watch online at full 1280x720 resolution.Note: Click the 'full screen' icon (to the left of the volume control) in order to watch online at full 1280x720 resolution.

Bookmark and Share Bookmark or Share Post

Customizing The Front Page Of Your Site

Lesson Eight of my special Getting Started With Drupal series of videos.

In this tutorial I show you some simple ways of creating a more custom look on the front page of your site. All blog posts are demoted from the front page. Blocks are moved into different regions allowed by the theme. A node is created specifically for the front page. Finally, I show you how to make some basic changes to the tpl.php template file so that you can have a front page that doesn't require any nodes to be published on it.

Bookmark and Share Bookmark or Share Post

Creating Content On Your Site

Lesson Five of my special Getting Started With Drupal series of instructional videos.

This video provides detailed instruction on adding blog posts and pages to your Drupal site. This version is a preview that focuses on the settings that need to be reviewed and possibly adjusted prior to publishing content. The premium version contains additional content as indicated below.

Premium Content: 
  • Adding Blog Posts
  • Adding A Page
  • Adjusting Theme Settings
  • Reviewing URL Alias Settings
  • Creating Menu Items
Bookmark and Share Bookmark or Share Post

The Deal With Nodes

Every so often I'll get a question from a user who is new to Drupal about nodes. "What is a node?" they want to know. Nodes are explained on Drupal.org as, "...any posting, such as a page, poll, story, forum text, or blog entry." That description is close but not every post on a Drupal site is a node. Comments (as the Drupal.org item mentions) are not nodes. Neither are user profiles.

The Difference Between Nodes And Other Content

Nodes contain at a minimum a title and most likely a body (or description) field. You actually have the option to not use the description field at all. All standard node types on a Drupal site contain a title and a body. You can add additional fields  (like email address, date or url) to your node types using the Content Construction Kit (CCK) module. You can create new node types altogether by using the core feature located at admin/content/types/add. This allows you to create a new type of node which can be customized by utilizing CCK.

Other content, like comments, profiles or the registration form, won't necessarily contain a title and body field. Another difference is that other content may not be indexed by the standard Drupal search functionality. User profiles are not indexed by Drupal search. Neither are items captured by the core aggregator module. Comments are indexed by Drupal search as a standard feature starting with Drupal 6.

Two more important node features are comments and attachments. Comments can be enabled (or disabled if you like) for every node type. Likewise you can attach files (like documents or images) to nodes as well. Finally, the standard Drupal statistics system will only keep track of node views.

What This Means To The Drupal Site Builder

So you've got these nodes and there are these other types of content floating out there. How does it affect how you build and manage your site? There are a world of options available when it comes to nodes.  So you  really need to consider the limitations of the types of content that aren't nodes. Let's look at the case of user profiles.

User profiles are not searchable and cannot be customized by CCK. If you don't plan to rely on user profiles as an important feature of your site then you probably won't care about this issue. Those that do care about the issue usually look for a work around like a nice contributed module. The content profile module can help you make profiles available as nodes.

Imported content is another issue. The standard aggregator module lists imported items but does not offer a permanent link, search indexing or the ability to add comments to the items that you have imported. If you really want to build your site around aggregated content then you will probably want to investigate contributed modules like Activity Stream or Feed API.

There can be a down side to turing certain types of content into nodes. As you add more and more content as nodes your site performance could be negatively impacted. So the balance between everything as nodes and the potential performance and maintenace issues should be considered.

How To Know When You've Created A Node

You know that content is a node when it is created by going to the node/add link on your Drupal site. I mentioned that for two reasons. First, it's a simple way to know if a node is created. Second, it's because pages don't necessarily have to be nodes.

There are pages that are created by going to the link node/add/page on your site. Those pages are nodes. They will be indexed by search, can have file attachments, comments, etc. You can also create a page which contains a list of nodes by using the Views module. It is very important to understand that distinction.

Why You Might Not Care

If you're building a very basic site that simply relies on the standard content types (like blog, page, story, poll, forum post) then whether or not content is considered a node should not be important to you. If that's the case then have no worries.

As I stated above it could become an issue if you plan to do more complex things like making use of imported (aka aggregated) content and complex user profiles.

Comments Welcome

Since this is a blog post, which means (hooray!) it's a node, you can and should leave comments if the concept continues to confuse or otherwise perplex you.

Bookmark and Share Bookmark or Share Post

Adding Fields With CCK

This video shows how to add extra fields to existing content types (such as blog posts) using the Content Construction Kit (CCK) module in Drupal 6.

Bookmark and Share Bookmark or Share Post

Understanding Input Formats

From time to time people will ask me questions about problems they are having with content not displaying properly in nodes. Site developers may have problems displaying images, javascript, flash and php code. The problem is usually related to the input format chosen when publishing the node. The following video provides a very detailed look at how input formats work within Drupal.

 

Quicktime Video

Input Format Basics

There are three "out of the box" input formats for Drupal. These formats can be found on your site at admin/settings/filters.

  1. Filtered HTML - This format allows very basic text input and some HTML. This is a good format for comments and user generated content since it limits the ability of the user to add malicious code to the node.
  2. Full HTML - This format allows the full range of HTML tags including <embed> codes that are typically used for inserting widgets or embedded videos. This is my preferred format as a site administrator for creating all nodes and blocks on my sites. You can open this up to site users but it's recommended only for logged in users that have accounts at your site.
  3. PHP Code -  This format allows the posting of PHP code. This is used to customize the nodes on your site. There is a gallery of PHP snippets on Drupal.org where you can find examples thay may help extend the features of your site. This is a format that should only be available to admin users of the site. Opening up the PHP format to users jeopardizes the security of the site. So take great care when using this format.

The input formats in Drupal are highly customizable so you're not stuck with the exact formats that come standard with Drupal. Since these input formats greatly effect how and what content is posted to your site it is definitely a worthwhile investment of time to get to know them better.

Bookmark and Share Bookmark or Share Post

Easy Node Customization

Drupal has an awesome customization feature that not too many new people seem to know about. You can customize just about any view by creating a special template file for that view.

For Example:

Let's say that you want to update the front page layout. What you need to do is create a custom template file for the front page. Drupal themes have template files for each node type. If you look in your theme directory you should see files like node.tpl.php and page.tpl.php. These files describe the layout for nodes (like blog posts) and pages respectively.

Open the page.tpl.php file. Then save the file as page-front.tpl.php. Congratulations, you have just created a custom theme file for the front page of your site. When you edit the contents of that file and upload it to your theme directory the layout in that file will apply only to the front page of your site.

Bookmark and Share Bookmark or Share Post
Syndicate content