Skip to content

Commit 73b280f

Browse files
author
Chris Tickner
committed
[Book] [Templating] App Global Section: Fixed some formatting/presentation.
1 parent dd1a12a commit 73b280f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

book/templating.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,17 +889,18 @@ give you access to some application specific variables automatically:
889889

890890
.. code-block:: html+jinja
891891

892+
<p>Username: {{ app.user.username }}</p>
892893
{% if app.debug %}
893-
<p>Username: {{ app.user.username }}</p>
894894
<p>Request method: {{ app.request.method }}</p>
895895
<p>Application Environment: {{ app.environment }}</p>
896896
{% endif %}
897897

898898
.. code-block:: html+php
899+
900+
<p>Username: <?php echo $app->getUser()->getUsername() ?></p>
899901
<?php if ($app->getDebug()): ?>
900-
<p>Username: <?php echo $app->getUser()->getUsername() ?></p>
901902
<p>Request method: <?php echo $app->getRequest()->getMethod() ?></p>
902-
<p>Application Environment: <?php echo $app->getEnvironment() ?></p>
903+
<p>Application Environment: <?php echo $app->getEnvironment() ?></p>
903904
<?php endif; ?>
904905

905906
.. index::

0 commit comments

Comments
 (0)