field_attach_load() then loads the ‘subtitle’ and ‘photo’ fields because they are both attached to the ‘node’ bundle ‘article’.įield definitions are represented as an array of key/value pairs. When the node system uses the Field Attach API to load all fields for an Article node, it passes the node’s entity type (which is ‘node’) and content type (which is ‘article’) as the node’s bundle. The administrator (again, via a UI) creates two Field Instances, one attaching the field ‘subtitle’ to the ‘node’ bundle ‘article’ and one attaching the field ‘photo’ to the ‘node’ bundle ‘article’. Using the Field API or Field UI module, the administrator creates a field named ‘subtitle’ of type ‘text’ and a field named ‘photo’ of type ‘image’. A Bundle is a set of fields that are treated as a group by the Field Attach API and is related to a single fieldable entity type.įor example, suppose a site administrator wants Article nodes to have a subtitle and photo. A Field Instance is a Field attached to a single Bundle. A Field defines a particular type of data that can be attached to entities. The Field API defines two primary data structures, Field and Instance, and the concept of a Bundle. Other modules can provide a user interface for managing custom fields via a web browser as well as a wide and flexible variety of data type, form element, and display format capabilities. Any entity type (node, user, etc.) can use the Field API to make itself “fieldable” and thus allow fields to be attached to it. The Field API allows custom data fields to be attached to Drupal entities and takes care of storing, loading, editing, and rendering field data. A theme may contain one or more templates, depending on the complexity of the site and the way it has been designed. Also included with each theme is a set of functions that can be used to override standard functions in the modules in order to provide complete control over how the modules generate their markup at output time. This consists primarily of XHTML and CSS, with some PHP variables intermixed, so Drupal-generated content can go in the appropriate spots. The top conceptual layer of the drupal architecture is the theme. User permissions are defined for various roles and users are assigned to these roles in order to grant them the defined permissions. By default, new menu items are placed inside a built-in menu labeled Navigation, but administrators can also create custom menus. The Menu module provides an interface to control and customize the menu system that comes with Drupal. Menus are a collection of links (menu items) used to navigate a website. Blocks are similar to “widgets” in content management systems, but are highly generalized. Blocks are an extensible core feature of Drupal with a simple API provided by the block module. Blocks can be used to present anything, so just about any piece of content on a Drupal site (other than main content, breadcrumbs, and primary/secondary menus) is usually a block. Modules are functional plugins that are either part of the Drupal core or are contributed modules that build on Drupal’s core functionality. Before anything can be displayed on the site, it must be input as data. The five layers, starting from the bottom layer, are as follows:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |