Pages

Friday, 3 May 2013

Drupal basic concepts

Oh wow - Drupal as expected has a steep learning curve!  Once I'd installed it on a cloud server, here's what I first learned while clambering up the learning curve.  I've also written posts about specific (and general) stuff I've done with drupal.
First off I read through Drupal's Community Documentation and using Drupal's Glossary.

Basic Concepts

Field: reusable content e.g. number, date, some text, image  URL??
Entity type: used to store and display data and can be nodes, comments, taxonomy terms, user profiles or something custom built.  They are an abstraction that groups together fields i.e. groups together content.
Bundle: An implementation of entity type to which fields can be attached
Entity: One instance of an instance type
Node: a generic term for a grouping of content consisting of a number of fields depending on its content type.  A node is also an entity type.
Comment: user submitted content that is attached to a node, this is also an entity type.
Taxonomy: terms for classifying content that are grouped into vocabularies that are attached to content types thereby allowing classification of nodes.
User: A user is an entity type that includes fields such as username, password, email address by default.  Others such as a URL can be added.  Users have permissions and roles that set what they can and cannot do, can and cannot see within the site
Module: some code that provide the features or functionality of Drupal.  Core modules are included with the basic Drupal installation; contributed modules, written in PHP using the Drupal API can be downloaded and added on.
Region: Pages on your Drupal site are split up into Regions e.g. header, footer, sidebar, main content
Block: discrete pieces of information to put into Regions and can be menus, module outputs, dynamic or static chunks of information.
Menus: A type of block, menus can be Primary Links, Secondary Links or Navigation
Theme: controls the look of the site and consists of php and css code to control layout, font, colour etc.
View: Used to choose a number of entities to be displayed as a page, block or rss feed.
Database: used to store and retrieve all content within the website it contains tables for each type of information
Path: the unique reference to a function or piece of content as seen in the URL of anything in your Drupal site.  The standard prefix to the path is http://www.yoursite.com/?q= and the path something like node/366 or taxonomy/term/39 or user/3.  So a full URL would be http://www.yoursite.com/?q=node/366.
Clean URLs: Changes the default path to the cleaner to http://www.yoursite.com/node/366.  This helps search engines find and rank your page easier than with the default dynamic path.
URL Aliases: An administrator can set readable aliases for each path in Configuration -> URL Aliases (in the Search and Metadata group).  This would change the Clean URL path above to http://www.yoursite.com/my-project-description.  This helps search engines find your page and give it a better rank than Clean URLs.

Content Types

Article: for information that is updated, cross-referenced or categorized
Basic Page: static content that can be added to the main navigation bar
Book Page: part of a collaborative book which (in Drupal 7) can include any content type
Forum Topic: can be replied to by users creating Comments and categorized by a taxonomy/vocabulary
Poll: allows users to select from a predefined set of responses to a question and provides a running count of those responses
Custom: You can define your own and Themes often include lots of custom content types

Trying to put this in diagram form isn't perfect but here goes:

Drupal Flow

The Drupal Overview helped understand it a bit more.  Everything is based on data that is operated on by modules which show things in blocks & menus which are controlled by user permissions and displayed within templates.  You need all these things flowing nicely for anything to work as shown below where A to C are problems and D is correct.
Drupal Flow

I describe how I put this understanding into effect to create my website for Chanza Chanzo Ltd in another post (yet to be written but will link to from here).