A
A
Alexander Ivanov2015-05-14 11:33:51
Yii
Alexander Ivanov, 2015-05-14 11:33:51

How to properly add a new style to head in YII2?

by default, the head(main.php) section in YII2 works like this:

<title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
  </head>

I understand that I can just write the style like this:
<title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
  <link rel="stylesheet" href="путь до ссылки">
  </head>

but as I understand it, this is not the only way, since there is a HEAD () function, it is written somewhere and it loads the styles.
Where is this function located and how does it work?
But enough to answer where it is)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grechushnikov, 2015-05-14
@cimonlebedev

/assets/AppAsset.php <=

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question