Drupal 节点揭秘 [英] Drupal node demystified

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

问题描述


我是 Drupal 的新手,希望了解该平台的工作原理.
具体来说,我对 Node 对象感到困惑.
是什么东西,Content-Type是怎么进来的?!
好像整个 Drupal 就是节点、节点、节点.


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.

很想听听您的见解.

推荐答案

当你第一次接触 Drupal 时,Drupal 中的节点是一种奇怪的动物,但一旦你掌握了它,你就会发现它非常有用.

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.

Drupal 节点是一个信息单元.通常,它是一个相互关联的信息单元,对于站点来说是不可分割的.例如,如果您有一个代表人员及其地址的节点,则可以将其拆分为地址节点和人员节点并将它们关联起来,但是除非您具有显示给定地址上有多少人的功能,否则它没有用将其拆分为两个节点,最好将它们作为一个单元保留在一起.想一想:如果您将数据整理到索引卡或纸页上,您是将这些信息一起列出,还是将它们分开更有用?如果在一起,那么它们很可能属于一个节点.

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.

由于 Drupal 站点上的大部分数据都是节点,因此对节点进行分类很有用,这样您就可以找到您感兴趣的那些.这些分类中最基本的一种是内容类型,这基本上是什么节点代表的信息类型,一旦创建就不可更改.每种内容类型都有其自己的用于创建和编辑节点类型的单独表单,并代表不同类型的信息.页面节点是代表站点上静态页面的节点 - 就像一个关于页面.Story 节点表示应该出现在内容列表中的文章或故事.一个博客节点将代表一个博客条目……在 Drupal 6 中,您可以创建任意数量的内容类型.

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.

一旦您超越了内容类型,就有很多不同的方法可以对您的节点进行分类.CCK(内容构建工具包)是一个非常有用的工具,它非常有用,以至于在 Drupal 7 中的大部分CCK 中的功能已包含在 Drupal 的核心中.CCK 允许您将多种类型的字段添加到一个开箱即用的节点,然后还有其他模块(Filefield图像字段链接Location) 创建要添加的新字段类型.

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天全站免登陆