User login

An experienced web developer turns to Drupal and screams at his computer trying to add fields

Without further ado...

So of course the first thing I want to do in Drupal after I get it
installed, while Jess is working on theming our new site (which sounds
like going through a time machine back to 1999, since many of the
available themes are hideous, use tables and are not cross-browser
compatable...), I want to add a new field to the entry form for my new
content type, which i'm calling video. I'm just experimenting here, but
this should be easy. In the SCW installation it's easy, but of course
this is a fresh install, so who knows. Seems like in the master CMS that
is Drupal, adding fields to an custom content type should be built-in
and straightforward.

But when I can find no intuitive way to do this, I go to the Drupal
documentation. There is a ton of it, as I already know, but of course I
can't find anything because it's a total mess. Let me give you a sample
of my route at this stage:

http://drupal.org/handbooks
http://drupal.org/handbook/customization
http://drupal.org/handbook/customization/howto

I wandered around these pages for a while, trying to make sense of the
bizarre, illogical organization of Drupal's documentation. Eventually,
nothing really stuck out as being remotely helpful. Which just seemed
weird -- I mean, wouldn't creating custom content types be the first
thing any site builder would want to do?

Anyway, so then I went to Google:
drupal adding fields form content type

The first useful result is:
http://agaricdesign.com/additional-fields-for-a-content-type-two-approaches-for-drupal-4-7

Now I got quite a chuckle when your handsome mug was staring at me. And
of course, I immediately felt at ease, like a friend was there to hold
my hand. And a reference to CCK, which I know is a module used in the
SCW Drupal installation. So, yay. Except it seems to suggest I need to
install a module to do this most basic of tasks? I mean, if Drupal were
a blogging system like WordPress, you might expect to have to install a
plugin to enable custom fields (though you'd be wrong...). But for a
supposedly full-fledged CMS? Weird.

Then I realize, Oh no, this is for Drupal 4.7. Does it still apply?

In any case, as recently as version 4.7, the instructions on the
following page were considered a reasonable answer to the question: "I
was wondering if I cam add fields to existing node types like story, etc"

http://api.drupal.org/api/function/nodeapi_example_nodeapi/4.7

Seriously? That is how someone who just wants to add custom fields would
go about it? The documentation is scant, and it looks like a nightmare.

When I stop screaming at my computer, I'm going to install this CCK
plugin and see if that fixes my problem. The description here
http://drupal.org/handbook/modules/cck
seems to suggest it's the way to go. So, if I'm right, then my journey
does have a successful ending.

But anyway, this frustration is precisely what I was afraid we would
encounter. I'm sure Drupal's sheer power makes it all worthwhile to
those who eventually learn to harness it. But I'm not an idiot. I
understand the theory behind CMSs and, as you know, I've built a fairly
complex CMS of my own. But even I get frustrated trying to figure out
how to do what, to me, seems like the simplest task a modern CMS should
accommodate.

Anyway I just thought I would share my frustrations. But this is the 2nd
or 3rd time I've looked for a basic solution to a Drupal problem and
stumbled across a post by you that made a good-faith attempt to help me.
So in a way what I'm saying is, you are, so far, the only good thing
about Drupal, which makes me feel lucky to know you.

More later, I'm sure...

Brian

Benjamin Melancon wrote:

Hi Brian,

Lol, stop your Drupal hating (and I'd only read a paragraph when I wrote that, ha!). Yeah the themes are awful try starting with http://drupal.org/project/zen

And Drupal is nothing without CCK and Views, http://drupal.org/project/cck and http://drupal.org/project/views

CCK does the fields that you want. Then additional CCK related modules do different kinds of fields, but most of the important ones are in CCK.

Oh and add http://drupal.org/project/admin_menu so you can actually see what's going on.

and http://drupal.org/project/adminrole so you can have multiple

Oh and just see our colleague (but not yet coworker, harrumph) Kathleen Murtaugh's contrib module guide: http://ceardach.com/blog/2008/09/newbies-guide-contributed-drupal-modules

Drupal is *modular*. It's a developer's platform. It's not about core doing stuff, it's about core providing the connections and getting out of the way for developers, for modules, to do crazy things.

And Dan's on my case to finish my Related Content module so that theoretically that ancient post, talking about doing it the bad old way, would be linked to some actually useful new post. (Although most of my posts are about deep development murky weirdness and not about how to set up a site, that is the API and not the UI.)

Can I post your rant, because it is important.

Oh, and the handbook pages are editable by any registered user now, so let's try and fix them!

benjamin

p.s. our socially conscious German sysadmin is tearing things up across the water, what would financially meet your dev-test-live hosting needs so, for instance, all these essential modules would be in place when you start a project?

Agaric Design Collective
Open Source Free Software Web Development
http://agaricdesign.com/

Resolution

Latest update...

So I installed and configured CCK, no problem. Easy as it should have been. Then I searched and quickly (within a minute) found the sub-module Emfield, which allows me to embed a video in the new content type I've created. In fact, it does EXACTLY what I had hoped for, and it does it quite easily. I could not have hoped it would be simpler, and I can attest that no existing WordPress plugin would have enabled this quite so simply. So, bravo, chalk one up for Drupal.

Brian

Searched words: 
Content Construction Kit not in Drupal core yet adding fields to content types (aka node types)

Comments

The handbook really was useless in this situation

So I tried to help by adding this thin page in a spot I hope it will be found: How to add fields to a content type.

Brian and anybody, I'm pretty sure that if you get a user account on Drupal.org you can just edit this page and improve it!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.