8000 [profiler] Fix conditional expression to provide a default value by krzysiekpiasecki · Pull Request #16653 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[profiler] Fix conditional expression to provide a default value #16653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix conditional expression to provide a default value
From the cookbook:
<cite>{# the 'link' value set to 'false' means that this panel doesn't show a section in the web profiler (default is 'true'). #}</cite>

Simple conditional expression is not enough to provide a default value for the link parameter
```twig
 {% if link %}
```
  • Loading branch information
krzysiekpiasecki committed Nov 24, 2015
commit 59b5c42e86e5bc5f11bc2f2e061d4e19c12ebb87
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="sf-toolbar-block sf-toolbar-block-{{ name }} sf-toolbar-status-{{ status|default('normal') }} {{ additional_classes|default('') }}">
{% if link %}<a href="{{ path('_profiler', { token: token, panel: name }) }}">{% endif %}
{% if link is not defined or link %}<a href="{{ path('_profiler', { token: token, panel: name }) }}">{% endif %}
<div class="sf-toolbar-icon">{{ icon|default('') }}</div>
{% if link %}</a>{% endif %}
{% if link is not defined or link %}</a>{% endif %}
<div class="sf-toolbar-info">{{ text|default('') }}</div>
</div>
0