Skip to content

Instantly share code, notes, and snippets.

@kaspar-allenbach
Last active April 10, 2018 10:49
Show Gist options
  • Save kaspar-allenbach/5f46f25285cca637560f1d215f858418 to your computer and use it in GitHub Desktop.
Save kaspar-allenbach/5f46f25285cca637560f1d215f858418 to your computer and use it in GitHub Desktop.
Craft3 deprecated Tags

Craft 3 Learning Curve

I try to create a comprehensive tag list of Old vs new craft tags. SO lets start Craft 3 Changes

  • All loops have to be called with .all()
  • Macros have to be imported in EVERY file they apear. Not just in the parent file 🤬
  • _self macros have to be imported into the parent macro with {% import _self as macro %} SE Querstion

Accessing the settings in general.php

  • Old: {% if craft.config.environment == 'live' %}
  • New: {% if craft.app.config.general.environment == 'live' %}

Locales

  • Old: {{ entry.locale }}
  • New: {{ craft.app.locale }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment