Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Twig Super Power Roundup (Craft CMS 3)

Jason Mayo
November 01, 2018

Twig Super Power Roundup (Craft CMS 3)

Talk given at Craft CMS Manchester Meetup #12. Pulls together all the TWIG tips gained from DotAll2018 + some.

Jason Mayo

November 01, 2018

More Decks by Jason Mayo

Other Decks in Technology


  1. Null-Coalescing Operator Returns the rst value if it is de

    ned and not null, otherwise second value Plugin (Better) version - https://github.com/nystudio107/craft-emptycoalesce
  2. atoms Atoms are the basic building blocks of matter. Applied

    to web interfaces, atoms are our HTML tags, such as a form label, an input or a button.
  3. molecules Molecules are groups of atoms bonded together and are

    the smallest fundamental units of a compound. For example, a form label, input or button aren’t too useful by themselves, but combine them together as a form and now they can actually do something together.
  4. organisms Molecules give us some building blocks to work with,

    and we can now combine them together to form organisms.
  5. Tailwind / Utility Class If using utility classes e.g. Tailwind,

    go a step further to make molecules more customisable using Colours, Transitions etc. Using Dynamic Fields.
  6. Include Utility Macro Output the utitlity via a macro so

    it can be reused through multiple molecules / atoms