Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff9f315

Browse files
ifdatticwouterj
authored andcommitted
Update asset_management.rst
| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | 2.3| Fixed tickets |
1 parent8d9a47c commitff9f315

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎cookbook/assetic/asset_management.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ directly:
1818

1919
..code-block::html+jinja
2020

21-
<script src="{{ asset('js/script.js') }}" type="text/javascript"></script>
21+
<script src="{{ asset('js/script.js') }}"></script>
2222

2323
..code-block::php
2424
25-
<scriptsrc="<?php echo $view['assets']->getUrl('js/script.js') ?>"type="text/javascript"></script>
25+
<scriptsrc="<?php echo $view['assets']->getUrl('js/script.js') ?>"></script>
2626
2727
But *with* Assetic, you can manipulate these assets however you want (or
2828
load them from anywhere) before serving them. This means you can:
@@ -60,15 +60,15 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
6060
..code-block::html+jinja
6161

6262
{% javascripts '@AppBundle/Resources/public/js/*' %}
63-
<scripttype="text/javascript"src="{{ asset_url }}"></script>
63+
<script src="{{ asset_url }}"></script>
6464
{% endjavascripts %}
6565
6666
..code-block::html+php
6767

6868
<?php foreach ($view['assetic']->javascripts(
6969
array('@AppBundle/Resources/public/js/*')
7070
) as $url): ?>
71-
<scripttype="text/javascript"src="<?php echo $view->escape($url) ?>"></script>
71+
<script src="<?php echo $view->escape($url) ?>"></script>
7272
<?php endforeach ?>
7373
7474
..note::
@@ -82,7 +82,7 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
8282
{# ... #}
8383
{% block javascripts %}
8484
{% javascripts '@AppBundle/Resources/public/js/*' %}
85-
<scripttype="text/javascript"src="{{ asset_url }}"></script>
85+
<script src="{{ asset_url }}"></script>
8686
{% endjavascripts %}
8787
{% endblock %}
8888
{# ... #}
@@ -548,7 +548,7 @@ command will automatically regenerate assets *as they change*:
548548
$ php app/console assetic:dump --watch
549549
550550
Since running this command in the ``dev`` environment may generate a bunch
551-
of files, it's usually a good idea to point your generatedassets files to
551+
of files, it's usually a good idea to point your generatedasset files to
552552
some isolated directory (e.g. ``/js/compiled``), to keep things organized:
553553

554554
..configuration-block::

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp