5.0 KiB
5.0 KiB
CMS Concepts
[Work in progress]
Table of Contents
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[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
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_BLOCK] (/library/src/kernel/content/cms_block.e): The deferred class CMS_BLOCK provides an abstraction to describe content to be placed inside Regions.
- [CMS_CONTENT_BLOCK] (/library/src/kernel/content/cms_content_block.e): The class CMS_CONTENT_BLOCK describe how to provide generic content.
- CMS_MENU_BLOCK: The class CMS_MENU_BLOCK describe how to provides a menu of navigational links.
- [CMS_SMARTY_TEMPLATE_BLOCK] (/library/src/kernel/content/cms_smarty_templateblock.e) The class CMS_SMARTY_TEMPLATE_BLOCK describe how to use a CMS block with smarty template file content.
Important Classes
- [CMS_MODULE] (/library/src/modules/cms_module.e): The deferred class CMS_MODULE provides an abstraction to describe a generic module that add features to your web site.
- CMS_RESPONSE. The deferred class CMS_RESPONSE provide an abstraction to builds the content to get process to render the output.
- [CMS_HOOK] (/library/src/hooks/cms_hook.e): The deferred class CMS_HOOK is a marker interface for CMS Hook
- [CMS_HOOK_AUTO_REGISTER] (/library/src/hooks/cms_hook_auto_register.e): The deferred class provides an abstraction that when inheriting from this class, the declared hooks are automatically registered, otherwise, each descendant has to add it to the cms service itself.
- CMS_HOOK_BLOCK: The class CMS_HOOK_BLOCK describe a hook providing a way to alter a generic block.
- CMS_HOOK_FORM_ALTER: The class CMS_HOOK_FORM_ATLER describe a hook providing a way to alter a form.
- CMS_HOOK_MENU_ALTER: The class CMS_HOOK_MENU_ATLER describe a hook providing a way to alter a menu.
- CMS_HOOK_MENU_SYSTEM_ALTER: The class CMS_HOOK_MENU_SYSTEM_ALTER describe a hook providing a way to alter the CMS menu system.
- CMS_HOOK_VALUE_TABLE_ALTER:: The class CMS_HOOK_VALUE_TABLE_ALTER describe a hook providing a way to alter the value table for a response.