PHPackages                             smoya/asset-management-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. smoya/asset-management-bundle

AbandonedArchivedSymfony-bundle[Templating &amp; Views](/categories/templating)

smoya/asset-management-bundle
=============================

Symfony2 bundle that provides an easy way for manage assetic packages inclusion in Twig Templates.

1.0.0(12y ago)18112.5k↓35.7%3[1 issues](https://github.com/smoya/AssetManagementBundle/issues)1MITPHPPHP &gt;=5.3.2

Since Feb 5Pushed 11y ago2 watchersCompare

[ Source](https://github.com/smoya/AssetManagementBundle)[ Packagist](https://packagist.org/packages/smoya/asset-management-bundle)[ Docs](https://github.com/smoya/AssetManagementBundle)[ RSS](/packages/smoya-asset-management-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (1)Used By (1)

AssetManagementBundle [![Build Status](https://camo.githubusercontent.com/d40c04cf6203c584b273ec0d5c73213459e92764158e7cf6b5844f669154d460/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f736d6f79612f41737365744d616e6167656d656e7442756e646c652e706e67)](http://travis-ci.org/smoya/AssetManagementBundle)
=======================================================================================================================================================================================================================================================================================================================

[](#assetmanagementbundle-)

An Asset Management Bundle for Symfony2

\##TODO:

- Improve README Doc
- More functions
- Tests
- etc

This bundle provides an easy way for manage assetic packages inclusion in Twig Templates. Of course, We need to have previously installed the [Assetic library ](/kriswallsmith/assetic).

This bundle allows you to print the code that includes assets (javascript and css) there in the place where desired. For example, after loading javascript jquery libraries already loaded at the end of the html code.

In example, this is posible:

Template 1 (Not extends from a base template):

```
{{ assets_add('assetic/foo.js', 'js') }}
```

Base Template:

```
{{ assets_render('js') }}
```

Getting as a result:

```

```

Installation
------------

[](#installation)

### Add this entry to the `deps` file

[](#add-this-entry-to-the-deps-file)

```
[SmoyaAssetManagementBundle]
    git=https://github.com/smoya/AssetManagementBundle.git
    target=/bundles/Smoya/Bundle/AssetManagementBundle

```

### Register the bundle into your application Kernel

[](#register-the-bundle-into-your-application-kernel)

```
// app/AppKernel.php
public function registerBundles()
{
    return array(
        //..
        new Smoya\AssetManagementBundle\SmoyaAssetManagementBundle(),
        //..
    );
}

```

### In 2.1\*

[](#in-21)

```
Smoya\Bundle\AssetManagementBundle\SmoyaAssetManagementBundle()

```

Now update vendors:

```
$ ./bin/vendors
```

Now, we need to add this entry to the autoloader:

```
