Skip to content

Commit

Permalink
minor #4777 Update templating.rst (ifdattic)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.5 branch (closes #4777).

Discussion
----------

Update templating.rst

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.5
| Fixed tickets |

Commits
-------

aca0944 Update templating.rst
  • Loading branch information
wouterj committed Jan 8, 2015
2 parents 36f2e1f + aca0944 commit 32bd0b1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1035,9 +1035,14 @@ argument (or the ``version`` argument) to the desired version:

.. code-block:: html+php

<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, false, '3.0') ?>" alt="Symfony!" />

If you dont give a version or pass ``null``, the default package version
<img src="<?php echo $view['assets']->getUrl(
'images/logo.png',
null,
false,
'3.0'
) ?>" alt="Symfony!" />

If you don't give a version or pass ``null``, the default package version
(from :ref:`ref-framework-assets-version`) will be used. If you pass ``false``,
versioned URL will be deactivated for this asset.

Expand All @@ -1055,7 +1060,11 @@ If you need absolute URLs for assets, you can set the third argument (or the

.. code-block:: html+php

<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, true) ?>" alt="Symfony!" />
<img src="<?php echo $view['assets']->getUrl(
'images/logo.png',
null,
true
) ?>" alt="Symfony!" />

.. index::
single: Templating; Including stylesheets and JavaScripts
Expand Down

0 comments on commit 32bd0b1

Please sign in to comment.