You are here
DrupalSouth Melbourne 2015
Post conference thoughts and a summary of some of the sessions I attended and enjoyed at DrupalSouth on 5th-7th March 2015.
The event included 2 full days of sessions and a coding sprint day, and was held at the Melbourne Convention and Exhibition Centre (MCEC) in the Melbourne CBD.
Here are some of the take aways I had from a few of my favourite sessions:
How to create a custom theme in Drupal 8, by Magda Kostrzewa
Besides having dabbled a little in Twig at work and at previous conferences, I hadn’t yet looked at any theming in Drupal 8 so I found this session a really good introduction to Drupal 8 theming:
when toggling debug on in your sites/default/services.yml Drupal renders its markup with some useful HTML comments at the start of every block containing information on which template was used and where it’s located.
The “classy” theme that comes with Drupal 8 core is a base theme that you can optionally use. It’s purpose is to add the numerous classes and extra markup that you’d typically see in Drupal. Of course the point is not everyone wants all this markup and endless list of classes, so it's optional. You can read more about classy on the docs page for classy.
CSS and JS defined in your theme aren’t loaded on every page - look up something called ‘asset libraries’. You define these in theme.libraries.yml and use theme_preprocess_hook() to toggle the assets when required. You can also mark JS dependencies like jQuery or jQuery UI and Drupal will load these for you only when needed. The reason why jQuery isn't there all the time, is because Drupal isn’t always for a webpage.
Power to the Editors: Introducing the Paragraphs module, by Ivan Zugec & Murray Woodman
Knowing how troublesome a Body field can be for some content creators, and not having heard of the Paragraphs module before, I went along to see what this new approach was about. My take on it is that it lets you replace the body field with infinite entities of any type, style, order, etc. If you've used the field_collection module it's a bit like this, but with much more flexibility. This gives the content creators significant flexibility but keeps things structured enough that you can have your node bodies actually looking pretty good for once. The session also went over a few modules that Ivan and Murray had written to compliment paragraphs including Edgy, Classy Paragraphs and Paragraph pack.
Best practices for configuration management in Drupal 8, by Justin Randall
Most Drupal dev’s will already know about the new configuration management features in Drupal 8. Justin talked about how this works in practice and how best to approach things:
Drupal 8 comes with an import/export UI but don’t use it! It’s for experimenting with things locally, or for non-developers.
Use the drush command line tools to export, commit the changes in git, and checkout and import on the environment you’re deploying to.
You can specify in your settings.local.php file the path to where the configuration is exported - ideally set this above your docroot so that it's not web accessible or to save the trouble of setting a 'Deny All' property on the folder.
Unlike the features approach you no longer have to think about grouping features anymore, all configuration is exported into numerous yml files based on their purpose. This makes multi-developer development a lot simpler because you're now exporting everything to the same place and using git to track and merge changes. If you want to create distributable configurations (as people did with Features) perhaps look at install profiles.
The config_log module by Justin, can log all configuration changes in Drupal 8.
The sessions were recorded and will eventually be online soon. Check out the official Melbourne DrupalSouth website for updates on this.