Issue 15333

The new Drupal theme for smooth future development

15333
Reporter: bko
Assignee: bko
Type: Epic
Summary: The new Drupal theme for smooth future development
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2014-03-10 16:42:13.967
Updated: 2017-10-09 16:37:54.463
Resolved: 2017-10-09 16:37:54.424
        
Description: After the investigation in POR-1758 we decide to proceed and push this new theme into formal development. Along the way we will sort out historical issues in the old themes and make the coming development on Drupal more standardised and easier to maintain.

When communicating about layout and region, please follow [this page|http://dev.gbif.org/wiki/display/PDES/The+new+Drupal+theme+base+on+Bootstrap+and+less+CSS] for terminologies.

Principles for theme development:
1. Unused default regions should be kept in the templates. This will help us understand the updates from the base theme.
2. For each of the pages, if coding logic can be expanded from previously done templates, don't create a new one, hence we are consolidating the templates of vizz2.
3. When there are hooks to use for altering the style, don't put it in the HTML template. In principle, variables should be ready when they reach the template, so we should only see how the template controls the layout and content flow, rather then calculating variables. When needed, use various preprocess hooks to process variables. When combining several templates at different level, use customised gbif_page functions to make customized page build.
4. We should investigate whether all CSS elements are already provided by bootstrap theme, for example, drop-down menu. For existing elements, we use override.less. For new elements, we organise them in corresponding less files.
5. Organise and comment on template files so it's explicit for other developers to trace the code.
]]>