Concrete5

What's new in 5.7: M-R

Multilingual

Concrete5 has been available in multiple languages since 2009, and we've supported running multilingual sites for a number of years, but this has always been through the use of an add-on. In 5.7.3 multilingual support is now built right in. Create multiple language trees in your sitemap, auto-detect visitors' languages and route them to the correct one, map pages to those in other languages for use with the Switch Language block and more.

text

You can even translate the strings found in your theme and add-ons through a custom translation interface in the Dashboard!

Honorable Mention: Migrations

We now use the Migrations library from Doctrine to control our updates. You can use these in your add-ons and custom code as well. Migrations are a structured way to handle migrating between versions of databases. With Migrations you can handle upgrades and downgrades seamlesly.

Namespacing

This is a big one for PHP developers everywhere. If you're a Concrete5 developer from way back and you don't know what PHP namespacing is, now is the time to learn. Every class in 5.7 is now namespaced, and knowing how those namespaces work is key to developing in Concrete5 going forward. It's a little painful to learn, but once you understand how namespaces and the new 5.7 class autoloader work, everything gets much easier to work with.

ORM

Short for Object Relational Mapping, ORM is a way to manage the persisting of PHP objects without having to write database queries for reading, creating, updating and deleting them. Say you have an object like this:

$person = new Person();
$person->setFirstName('Andrew');
$person->setLastName('Embler');

And you wanted to add that person to the database, ORM lets you do it this way

$em = Database::getEntityManager();
$em->persist($person);

That's it. You write your classes with specially formatted PHP comments that describe which properties should be persisted in the database, and Doctrine takes care of the rest. We don't use Doctrine's ORM that much in the core yet, but it's a great fit for custom code and for add-ons.

Panels

Look around you. Editing in 5.7? You're going to see Panels. They're our replacement for many of the UI conventions in 5.6, including a large number of dialog windows. This is the page settings panel you get when you click on the Settings icon for a particular page.

Panels might take some getting used to, but we think you'll come to appreciate their speed of loading and the way they don't obscure the context of what you're currently working on. They also animate nicely, demo attractively to clients and are easier to learn.

Honorable Mention: Pagination

We now include the PHP Pagerfanta Pagination class, which provides a well-documented, structured way to page through data, and handle the display of that pagination.

Query Builder

In addition to ORM and the Database Access Layer, Doctrine also provides a well-documented, powerful query builder. The Query Builder is an object-oriented approach to querying a database, or even the ORM library itself. Here's an example:

$queryBuilder
->select('id', 'name')
->from('users')
->where('email = ?')
->setParameter(0, $userInputEmail)

It is this query builder object that the new FileList, UserList and PageList classes are built on. That means it's much easier to extend and work with these classes in 5.7, and the clean code ensures things will stay working well in the future.

Responsive Design

Everything about Concrete5 is responsive now: the built-in Elemental theme shows off responsive navigations; the core blocks function well at all screen sizes; your theme can offer responsive images using the picture tag; the dashboard works well on mobile devices, and even the front-end UI looks great on a phone:

That's all for now. If you have any questions about these features or any others listed in this series, don't hesitate to ask in the comments.

Loading Conversation