Skip to content

Commit

Permalink
[#3837] Fixes thanks to stof and WouterJ
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 10, 2014
1 parent 560e010 commit 4eafdbd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -991,10 +991,10 @@ assets won't be cached when deployed. For example, ``/images/logo.png`` might
look like ``/images/logo.png?v2``. For more information, see the :ref:`ref-framework-assets-version`
configuration option.

.. _`
.. _`book-templating-version-by-asset`:

.. versionadded:: 2.5
Setting versioned URLs on an asset-by-asset basis were introduced in Symfony 2.5.
Setting versioned URLs on an asset-by-asset basis was introduced in Symfony 2.5.

If you need to set a version for a specific asset, you can set the fourth
argument (or the ``version`` argument) to the desired version:
Expand All @@ -1003,14 +1003,14 @@ argument (or the ``version`` argument) to the desired version:

.. code-block:: html+jinja

<img src="{{ asset('images/logo.png', version=3.0) }}" alt="Symfony!" />
<img src="{{ asset('images/logo.png', version='3.0') }}" alt="Symfony!" />

.. 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
(from :ref:`ref-framework-assets-version`) wil be used. If you pass ``false``,
(from :ref:`ref-framework-assets-version`) will be used. If you pass ``false``,
versioned URL will be deactivated for this asset.

.. versionadded:: 2.5
Expand Down

0 comments on commit 4eafdbd

Please sign in to comment.