Files
ROC/doc/concepts.md
Javier Velilla 6162432d52 Update concepts.md
Updated Concepts table of contents
2014-11-19 11:32:59 -03:00

5.0 KiB

CMS Concepts

[Work in progress]

Table of Contents
  1. Theme
  2. Regions
  3. Blocks
  4. Modules
  5. Hooks
Theme ----- In a CMS , a theme is a collection of templates files (HTML, CSS, Images, etc ) that determine how a CMS web site looks. The goal of a theme is to let you change the look and feel of the site. Eiffel CMS uses the same default regions as Drupal for themes.

Important Classes

  • [CMS_THEME] (/library/src/theme/cms_theme.e): The deferred class CMS_THEME provides an abstraction to the actual theme.
  • [SMARTY_CMS_THEME] (/library/src/theme/smarty_theme/smarty_cms_theme.e): The class SMARTY_CMS_THEME, is a theme implementation using the [Eiffel Smarty library] (https://github.com/eiffelhub/template-smarty).
  • [CMS_TEMPLATE] (/library/src/theme/cms_template.e): The deferred CMS_TEMPLATE clas provides an abstraction to describe the theme, the variables to feed it and how to render it as html. At the moment there is only one implementation [SMARTY_CMS_PAGE_TEMPLATE] (/library/src/theme/smarty_theme/smarty_cms_page_template.e).
Regions ------- The layout of a CMS web page has predefined area called **regions**. The Eiffel CMS uses the same default regions as Drupal, so let's see them in the following image. ![default page layout](http://themery.com/sites/default/files/figure-15-10.png)
regions[page_top] = Top
regions[header] = Header
regions[content] = Content
regions[highlighted] = Highlighted
regions[help] = Help
regions[footer] = Footer
regions[first_sidebar] = first sidebar
regions[second_sidebar] = second sidebar
regions[page_bottom] = Bottom
**Regions Hold Blocks**

What goes inside regions? Generally, regions hold smaller piece of content called blocks. Blocks hold chunks of content, like the user login form, navigation menu or the information for the footer.

Regions are defined in a configuration file theme.info.

CMS_BLOCK --------- **What is a cms block?** Blocks are chunk of content that can be created to display whatever you want, and then can be placed in various resgions in your template (theme) layout.

Important Classes

CMS_MODULES ----------- What is a cms module? Modules are piece of code that adds one or more features to your web site. Modules can be plugged and combined to provide a web site customized to your needs. There are modules for many purposes, for example Administratiton, Basic Authentication, etc.

Important Classes

CMS_HOOK -------- Hooks is a mechanism which provide a way for modules to interact with each other and extending blocks of the current CMS.