Created
January 13, 2015 18:19
-
-
Save brittanmcg/1b5ce7ba3f99fb7378ed to your computer and use it in GitHub Desktop.
Twig conditional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if random(1) == 1 %} | |
{% set sidebarQuery = "withSidebar" %} | |
{% include 'file.html.twig' %} | |
{% else %} | |
{% set sidebarQuery = "withoutSidebar" %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment