Drupal节点神秘化 [英] Drupal node demystified

查看:89
本文介绍了Drupal节点神秘化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是Drupal的新手,希望了解这个平台的工作原理。

具体来说,我被Node对象感到神秘。

这是什么,Content-Type如何进入?!

看起来整个Drupal只是节点,节点,节点。



解决方案

在Drupal中,节点在第一次遇到Drupal时是一种奇怪的动物,但是一旦你得到它,你会发现它是非常有用的。



Drupal节点是一个信息单元。通常,它是一个相互关联的信息的单位,因为该网站不是有用的可分割的。例如,如果您有一个代表人员及其地址的节点,则可以将其拆分为地址节点和人员节点,并将其关联,但除非您具有显示指定地址中的人数的功能,否则无效将其分为两个节点,更好地将它们作为一个单元保持在一起。考虑一下:如果您将数据分类到索引卡片或纸张页面上,您是否将信息列在一起,还是将其分开?如果一起,那么它们可能在一个节点上属于一起。



由于Drupal站点上的大多数数据都是节点,因此可以对节点进行分类,以便找到这些分类中最基本的一个是内容类型,它基本上是节点所代表的什么样的信息,一旦创建就不可更改。每个内容类型都有自己独立的表单,用于创建和编辑节点类型,并表示不同类型的信息。页面节点是表示站点上静态页面的节点,如关于页面。故事节点表示应该在内容列表中显示的文章或故事。博客节点将代表一个博客条目...在Drupal 6中,您可以创建尽可能多的内容类型。



一旦超越了内容类型,很多不同的方式来分类您的节点。 CCK (内容构建工具包)是非常有用的一个,它在Drupal 7中大部分是非常有用的CCK的功能已经被纳入了Drupal的核心。 CCK允许您将许多类型的字段添加到开箱即用的节点,然后还有其他模块( Filefield Imagefield 链接位置),创建要添加的新字段类型。



在核心中,排序您的节点的另一种方式是分类模块,它允许您定义可以分配给节点的标签或术语的词汇表。这些术语可以由网站管理员提前定义,或者可以创建一个标签词汇表,允许用户在创建或编辑节点时创建术语。



I'm new to Drupal, and wish to understand how this platform works.
Specifically, I'm mystified by the Node object.
What is it, how does Content-Type get in?!
It seems like the whole of Drupal is just nodes, nodes, nodes.

Would love to hear you insights.

解决方案

The node, in Drupal, is an odd animal when you first encounter Drupal, but once you get it you'll find that it's quite useful.

A Drupal Node is a unit of information. Usually, it's a unit of interrelated information that for the site is not usefully divisible. For example, if you had a node that represented people and their addresses, you could split it into address nodes and people nodes and associate them, but unless you've got functionality that displays how many people are at a given address, it's not useful to split it into two nodes, and better to keep them together as one unit. Consider: If you were sorting the data out onto index cards, or pages of paper, would you list the information together, or would it be more useful to keep it apart? If together, then they probably belong together on a node.

Since most of the data on a Drupal site are nodes, it's useful to classify the nodes so you can find the ones you're interested in. One of the most basic of these classifications is the Content Type, which is basically what kind of information the node represents, and is not changeable once created. Each Content type has it's own separate form for creating and editing the node type, and represents a different type of information. Page nodes are nodes that represent static pages on your site - like an About page. A Story node represents an article or story which should show up in lists of content. A Blog node would represent a blog entry... in Drupal 6 you can create as many Content Types as you like.

Once you go beyond Content Types, there's quite a lot of different ways to classify your nodes. CCK (The Content Construction Kit) is a wildly useful one, and it's so useful that in Drupal 7 most of the functionality in CCK has been included in the core of Drupal. CCK allows you add many types of fields to a node out of the box, and then there are other modules (Filefield, Imagefield, Link, Location) that create new field types to add.

In core, another way of sorting out your nodes is the Taxonomy module, which allows you to define vocabularies of tags or terms that can be assigned to nodes. These terms can be defined by the site admins ahead of time, or they can create a 'Tag' vocabulary which allows users to create terms as they create or edit their nodes.

这篇关于Drupal节点神秘化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆