Oveview of Drupal Page-building
Submitted by webmaster@yamhi... on Thu, 03/22/2007 - 05:44.
The core principles of Drupal is that it is atabase-driven content to be custom-displayed via templates on a page. It separates Data (content) from Organizations of the data (what type of content it is), from Layout of the data on the page (where it is located on the page) to stylistic display of the data (font type, size, etc.). These are imperfect separations at times, but in the main is true.
- Database of tagged content
- Tags establish what (extra) identifying or controlling info/data is associated with each piece of content
- To Display or use that content, requires defining a node type (page, event, ...)
- Each node type is defined by a “template” -- a mixture of HTML and embedded PHP tags (that reference node data and tags) and code.
- Templates define what is to be displayed for each node and implements algorithms to control it’s layout based on tagged node data.
- layouts tagged with CSS classes and ids for later styling
- PHP file/node type (Page, Event, ...)
- PHP generates HTML, into the state HTML of a page -- simle layout without display (look) defined -- in other HTML words, lays out the tables and rows and cells, titles and paragraphs, but not what those elements look like, nor how big they are -- just how they relate to each other on the page
- A “module” is a collection of tags and templates to create and lay out a node type.
For our needs, we used predefined nodes and didn’t make any new ones.
- Display is contolled by a seris of CSS (Cascading Style Sheet) files which defines how elements are displayed (look), read in this order:
- system.css
- drupal.css
- <modulel-specific.css> -- page, header, footer, ...
- theme/style.css -- defines the look of a “theme” - a general design look
- <additional>.css in your code to override the other .css if you need to
- We didn’t change any of the CSS files, but did add some CSS code to correct some CSS problems in the default CSS, to override the defaults defined in the styles.css of the theme we worked from (DPO’s) in order to accomodate our particlar look&feel, and lastly added a little CSS to accomodate new code (from LeftyBlogs).
