This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

Concrete5 Block Areas Vs. Drupal Block Regions

Block Areas in concrete5 are the containers that blocks are added to and arranged in.  In Drupal, block regions are defined in the .info file for a template like so:

regions[header] = Header

This block region would then be output in a layout template, such as page.tpl.php or node.tpl.php:

print render($page['header']);

In concrete5, block areas are defined and output at the same time. If you’re starting with a minimal theme your page template file will likely be default.php.

Concrete5 offers two types of block Areas. Regular Areas establish a container that will hold a unique set of blocks for each page. You define a regular block Area like so:

$a = new Area('Main'); $a->display($c);

Global Block Areas are new to concrete5 and work more like Block Regions in Drupal. Any blocks you add to a Global Area in concrete5 will appear on all pages that use a template that includes that Global Area. You define Global Areas like this:

$ga = new GlobalArea('Header Nav'); $ga->display();

Defining a Global Area in a template file also creates an entry for that Global Area in the Global Areas section of the Dashboard Stacks page. We’ll talk more about Stacks later but for now just understand that this allows you to manage the content of that Global Area “out of context” on the back end of the site if you want to.

From concrete5 for Drupal Developers and Designers by Chris Hvizdak

Drupal and concrete5 both offer flexible ways to store content and display it on pages. Let’s compare some of the basics and look at how you can adapt common Drupal approaches to concrete5.

concrete5 Blocks Vs. Drupal Blocks

In concrete5 you will be storing most of your page body content in blocks, probably using the Content block. This is a big departure from Drupal where the core blocks are used mostly for supporting content that appears in sidebars, footers, etc.

Concrete5 includes a variety of blocks for storing different types of content. The Content block features Tiny_MCE and is the go to block for text content. Controls that allow editors to embed images, files or links to other pages are also baked into the Content block.

concrete5-content-block-edit-mode-2012.jpg

Loading Conversation