The right way to check for empty content in Twig
Have you ever used {% if content|render|trim is not empty %}
in twig to validate content is not empty? If so, you might end up with some surprises related to the use of the render
method.
Have you ever used {% if content|render|trim is not empty %}
in twig to validate content is not empty? If so, you might end up with some surprises related to the use of the render
method.
The State Library of South Australia is the state's largest public reference library with a collection focused on South Australian information and general reference material for information and research purposes. The library engaged PreviousNext to research their customers' needs and then design a new modern, engaging and accessible website in Drupal 8.
Read about State Library of South AustraliaFor a long time I’ve been compiling my Sass into a single CSS file - styles.css, but recently, with our component based design/frontend process and Drupal 8’s lovely Library system I’ve been wondering if the single file was still a good idea. Looking at the amount of unused CSS loading into any given page was a little bit painful.
Taronga Conservation Society Australia (TCSA) is a Government foundation that consists of Taronga Zoo, Sydney, and Western Plains Zoo, Dubbo. In late 2013, PreviousNext were engaged by TCSA to help move their existing website from Drupal 6 to 7 and to assist with the Drupal development and theming of the new site.
Read about Taronga Conservation Society AustraliaWith a vision to create an online "Neighbourhood of knowledge" that brings together practical, informative, and inspirational content, Directories Group, turned to PreviousNext for the user experience design and Drupal development of their newest site, homeheaven.com.au.
Read about homeheavenThe Australian Film, Radio and Television School has been delivering advanced training for the media industry for almost 40 years. When AFTRS wanted to implement an online learning environment (OLE), they decided on Drupal and PreviousNext.
Read about The Australian Film, Radio and Television SchoolFollowing the launch of the Australian Conservation Foundation’s main website, designed and developed by PreviousNext on a Drupal content management platform, ACF further engaged PreviousNext for the Drupal theming and development of action.org.au, a sub-site of their main website.
Read about Australian Conservation Foundation