Skip to content

Instantly share code, notes, and snippets.

@wake
Last active December 20, 2017 11:51
Show Gist options
  • Save wake/c6a3af88a3bd7932f143d54059dbeb5d to your computer and use it in GitHub Desktop.
Save wake/c6a3af88a3bd7932f143d54059dbeb5d to your computer and use it in GitHub Desktop.
{# Twig 樣板檔案 - 定義 block_name 為 buttons_start / buttons_end 的兩區塊樣板 #}
{# 按鈕開始區塊 #}
{% block _form_buttons_start_row -%}
<div class="form-group">
<div class="{{ block('form_label_class') }}"></div>
<div class="{{ block('form_group_class') }}">
{{- form_widget(form) -}}
{%- endblock _form_buttons_start_row %}
{# 按鈕結束區塊 #}
{% block _form_buttons_end_row -%}
{{- form_widget(form) -}}
</div>
</div>
{%- endblock _form_buttons_end_row %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment