Browse Source

argument pass optiomization

main
ghost 1 year ago
parent
commit
1495378a4b
  1. 8
      templates/default/layout.html.twig
  2. 8
      templates/default/search/index.html.twig

8
templates/default/layout.html.twig

@ -18,7 +18,11 @@
</a> </a>
{% block header_search %} {% block header_search %}
{{ render(controller( {{ render(controller(
'App\\Controller\\SearchController::module' 'App\\Controller\\SearchController::module',
{
query : app.request.get('query'),
type : app.request.get('type')
}
)) }} )) }}
{% endblock %} {% endblock %}
</div> </div>
@ -33,7 +37,7 @@
{% block main_profile %} {% block main_profile %}
{{ render(controller( {{ render(controller(
'App\\Controller\\UserController::module', 'App\\Controller\\UserController::module',
{route : app.request.get('_route')} { route : app.request.get('_route') }
)) }} )) }}
{% endblock %} {% endblock %}
{% block main_content %}{% endblock %} {% block main_content %}{% endblock %}

8
templates/default/search/index.html.twig

@ -1,10 +1,2 @@
{% extends 'default/layout.html.twig' %} {% extends 'default/layout.html.twig' %}
{% block title %}{{ query }} - {{'Search'|trans }} - {{ name }}{% endblock %} {% block title %}{{ query }} - {{'Search'|trans }} - {{ name }}{% endblock %}
{% block header_search %}
{{ render(controller(
'App\\Controller\\SearchController::module',
{
query : query
}
)) }}
{% endblock %}
Loading…
Cancel
Save