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

Now that we've explored many of the components and capabilities offered by the concrete5 core, how would you apply each to your web project? While there's often no single "right" to approach a problem, let's review the various tools available to us and help explain what each is best suited for.

Blocks

Blocks are “containers” for your content. Each block is designed to display a specific type of content: text, images, videos, navigation menus, etc. If there’s a type of content that will be displayed in multiple places throughout your site, this task will likely be handled by a blocks, whether its included in the core or written specifically for the task.

Blocks can be copied to the clipboard and added to stacks, easily re-arranged on a page and edited in-place. They can also be hard-coded into a page type or single page in order to utilize features of the concrete5 environment (say, a page list) without offering in-context editing capabilties.

Pages

The majority of your site’s content will reside on regular concrete5 pages-- so it's easy to add, move or revise your site as it evolves. Each page will use a layout determined by one of the Page Types you've defined in your theme.

Areas

Areas are containers for blocks, and they're defined and rendered via Page Types. If you'd like to place content on a page that you know will be updated or revised frequently, you'll want to make an area to hold this content, then add as many blocks as it takes to get the job done. Since new Areas can be created with a few moments of work, it's always possible to extend the site you've built in order to add a new place to put content.

Page Types

A Page Type can be thought of as a template for displaying your blocks. A Page Type is often applied to many different pages at the same time.

A good approach to building a site is to identify each unique page design or content layout you’ll need, then develop a Page Type for meet each challenge.

Single Pages

A Single Page is a good place to run custom, user-facing code that won’t appear anywhere else on your site. When you need a page that performs a specific function-- often a one-off page that collects, updates, or otherwise manipulates data-- a Single Page is the way to go.

One of the more obvious examples of a single page would be your site’s Login page. Another example could be a shopping cart page, again always located in its own spot at yoursite.com/cart. Since you wouldn’t typically want more than one Login or Shopping Cart landing page, there’s no need to incorporate this code into a reusable block.

Note that Single Pages use static, user-defined paths-- so your Login single page, for instance, will always be available at yoursite.com/login.

Tools scripts

If some part of your site needs to run a bit of code behind-the-scenes, consider placing a script in your tools/ directory. Such scripts are often used to perform maintenance or utility tasks. These scripts will contain unique code not used anywhere else on your site, just like a Single Page-- but differ in that they’re not intended to be user-facing, even though you'll be able to reap all the benefits of the concrete5 environment.

Loading Conversation