dantleech / dtlweb

New Homepage developed in parallel with tutorials
3 stars 0 forks source link

[ContactBundle] (#173) dynamic include CSS of bundles #23

Open dantleech opened 10 years ago

dantleech commented 10 years ago

Original issue: https://github.com/sulu-cmf/SuluAdminBundle/issues/29 Created by: @michaelzangerle at the moment the stylesheet files of other bundles are included in the index.html.twig - better would be a dynamic way

dantleech commented 10 years ago

Comment by: dantleech (2014-07-24T06:42:58+00:00) +1

dantleech commented 10 years ago

Comment by: dantleech (2014-07-25T07:50:34+00:00) I wonder if we (could/should) handle this with Assetic? (I have never used it)

If not we could register the CSS / JS files in the Admin class, which would kinda make sense

class Admin
{
    public function __construct()
    {
        $tihs->registerJavascirpts(array(
            'js/myjslib.js',
            'js/myotherlib.js',
        ));

        $this->registerStylesheets(array(
            // ...
        ));

We could then dynamically include them in index.html.twig or dump some JSON with a command which could be read by grunt so that we could compile the assets for production. }

dantleech commented 10 years ago

Comment by: dantleech (2014-07-25T07:50:34+00:00) I wonder if we (could/should) handle this with Assetic? (I have never used it)

If not we could register the CSS / JS files in the Admin class, which would kinda make sense

class Admin
{
    public function __construct()
    {
        $tihs->registerJavascirpts(array(
            'js/myjslib.js',
            'js/myotherlib.js',
        ));

        $this->registerStylesheets(array(
            // ...
        ));

We could then dynamically include them in index.html.twig or dump some JSON with a command which could be read by grunt so that we could compile the assets for production. }