Last active
March 9, 2017 14:46
-
-
Save tilllt/e10f3563c6f92bbbdabe811e55042b0a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
**Passing Variables to a {{Menu()}}** | |
{{menu('main', 'mytemplate.twig', {myvariablename: myvariablevalue})}} | |
**Setting and Getting Session Variables** | |
set it: | |
`{% set foo = app.session.set('variablename', theImage) %}` | |
to get it: | |
`{% set bgimage = app.session.get('variablename') %}` | |
**Checking if current Page is Homepage** | |
{% if app.request.get('_route') == 'homepage' %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment