Using nodes

6 replies [Last post]
mt
Offline
Last seen: 5 years 6 weeks ago
Joined: 2011-04-09

Hi,

First of all thank you for these great videos.
I feel more prepared than ever now, to work with Drupal and build a module.

If I may make a video request though, it would be a generel introduction to Drupal, its admin interface and the build in functionality.

So I'm starting to write my own module and will do it the DB way.
But I'm wondering - wouldn't it be more logical to add entries as nodes? This way they will be included in searches as well automaticly and as I understand it, everything in Drupal is based on nodes?

--
Morten

mt
Offline
Last seen: 5 years 6 weeks ago
Joined: 2011-04-09
I see chapter 11 actually

I see chapter 11 actually tells about using nodes and theming them, so maybe I should just start by viewing this chapter again.

Chris Shattuck
Offline
Last seen: 10 weeks 4 days ago
Joined: 2009-08-16
Hi there! Great request for

Hi there!

Great request for introductory videos, I'll be keeping this in mind.

As far as how you store your data, you make some good points about saving the data as nodes. You get to leverage the node system for working with and extending the data, as well as integrating with other modules like Search. There's also a lot less work when it comes to integrating with Views. If you're not sure which way to go, I would suggest beginning with nodes and working with some sample data to see if you can get what you need.

Cheers!
Chris

mt
Offline
Last seen: 5 years 6 weeks ago
Joined: 2011-04-09
Hi Chris I'm sure nodes are

Hi Chris

I'm sure nodes are the way to go.

One question though, which I'm sure you would answer in a maybe future video series.
How do I use Drupal?

I've seen all you Drupal 7 core videos now - and this time I haven't forgot any of them :)
I've read All the Geting startet pages on Drupal.org, I've dug into the documentation pages of Drupal.org, I've played with the popular moduler like views, ctools, pathauto, wysiwyg etc.

If I use nodes, which we have etstablished is the way to do it in most cases, then how do I setup my pages? (the best practice way?)
Is it normal to create my own *.tpl.php files in my theme for different kinds of nodes, listings etc?

Because for what i have experienced so far by playing with Drupal, I cannot "design" my nodes through the Drupal interface. I can arrange the content, like selecting that body should be sjosk before or after some of my costum fields. But if I where to place the content of to custom fields next to each other, I would need to write my own template for that. Right?

Manu newspapers here in Denmark have startet to use Drupal now. But when I take a look at their pages I imagin that they most have made their own templates to all of their node types?

Is this correct? Or would I to this in the interface somehow?
And once again - thank you for the work you have put into your videos. I'll recommend this whitout any seconds thoughts.

Chris Shattuck
Offline
Last seen: 10 weeks 4 days ago
Joined: 2009-08-16
Great questions! To address

Great questions!

To address your more specific question about how to lay out nodes, I should have videos to tackle this in the future, but for now let me see if I can point you in the right direction.

Using different template files for different content types is definitely normal. In combination with preprocessing functions, you should be able to get anything you need that way.

I've also had some great experiences using the Display Suite module along with straight up CSS. Display Suite can give you basic layouts for nodes like a 3-column layout with a header and footer, through simple settings in the "Display settings" area of a content type. From there, you can use CSS and field ordering to get what you need. You can then use preprocessing functions when you need to alter the actual content before it gets sent to the template. I haven't used the Custom Formatters module for Drupal 7 yet, but for Drupal 6 at least it provides a way to add reusable field formatters.

Let me know if this points you in the right direction.

Cheers!
Chris

mt
Offline
Last seen: 5 years 6 weeks ago
Joined: 2011-04-09
Thank you Chris, I

Thank you Chris,
I anticipated that this would be the normal way of doing it.
But to share my projects with future developers I find important to do it right the first time. And since I'll be working alone for some time, it's better to have asked one question to many, instead of creating my own way of doing things.

And Display Suite sounds interesting, I'll defiantly take a closer look to that.

Thank you for your time :)

Chris Shattuck
Offline
Last seen: 10 weeks 4 days ago
Joined: 2009-08-16
My pleasure, good luck!

My pleasure, good luck!

Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:


Loading...
Contact us

Below are the supported keyboard shortcuts for our video player.

space
Start / stop video
shift
Go to next video
shift
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
1...9
Jump to a percentage (2 is 20%, for example)
f
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
$29
1 month
$156
6 months
10% off
$276
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
user
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.