T
T
Turik-us2016-08-14 13:55:10
Yii
Turik-us, 2016-08-14 13:55:10

How to add project version when including css and js files?

I entered the release version number in the project parameters, how can I make it so that when styles and scripts are connected, this version number is added?

<link href="....../custom.css?v=14.88" rel="stylesheet">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-08-15
@slo_nik

Good afternoon.
In the configuration file, add the following to components:

'assetManager' => [
           'appendTimestamp' => true
       ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question