I would like to split my website to two area "Admin area" and "User ares", and the two areas should use different css files.My approach is as following:
{# path : /app/views/layouts/user.volt #}
<?php
$this->assets
->addCss('css/bootstrap.css')
->addCss('css/user.css');
?>
<div id="container">
{{ content() }}
</div>
{# path : /app/views/layouts/admin.volt #}
<?php
$this->assets
->addCss('css/bootstrap.css')
->addCss('css/admin.css');
?>
<div id="container">
{{ content() }}
</div>
{# path : /app/views/index.volt #}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Foo</title>
{{ this.assets.outputCss() }}
</head>
<body>
{{ content() }}
</body>
</html>
Is this a good approach? Or there is better one?