Skip to content

Instantly share code, notes, and snippets.

@ederrafo
Last active December 5, 2016 00:32
Show Gist options
  • Save ederrafo/f225da22fecfcfed085ea861af51b758 to your computer and use it in GitHub Desktop.
Save ederrafo/f225da22fecfcfed085ea861af51b758 to your computer and use it in GitHub Desktop.
enginte template
* Rendering the Form
{{ form_start(form) }}
{{ form_widget(form) }}
{{ form_end(form) }}
* Renders the HTML widget of a given field. If you apply this to an entire form or collection of fields,
each underlying form row will be rendered.
{# render a widget, but add a "foo" class to it #}
{{ form_widget(form.name, {'attr': {'class': 'foo'}}) }}
* include template:
{% for zone in content.blocks %}
{% set path = 'CmsCmsBundle:StyleBlock:' ~ zone.styles %}
{% include path %}
{% endfor %}
<!-- for path: src/JobBundle/Resources/views/job/search-box.html.twig -->
{% include 'JobBundle:Job:search-box.html.twig' %}
*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment