Skip to content

Commit

Permalink
Merge pull request avanzu#106 from OskarStark/patch-4
Browse files Browse the repository at this point in the history
yaml syntax highlighting
  • Loading branch information
quentin-st committed May 9, 2016
2 parents 56751fc + cedbda9 commit d81ae29
Showing 1 changed file with 44 additions and 37 deletions.
81 changes: 44 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ _Notice: if you prefer to stay with the AdminLTE theme v1.x, manually reference

Enable the bundle in your kernel:
```php
<?php
// app/AppKernel.php

public function registerBundles()
{
$bundles = array(
// ...
new Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),
);
}
<?php
// app/AppKernel.php

public function registerBundles()
{
$bundles = array(
// ...
new Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),
);
}
```

Install assets (preferably using symlink method but hardcopy works as well)...
Expand All @@ -42,44 +42,51 @@ This bundle requires assetic, but it isn't shipped with symfony anymore since ve

Enable the bundle in your kernel:
```php
<?php
// app/AppKernel.php

public function registerBundles()
{
$bundles = array(
// ...
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
);
}
<?php
// app/AppKernel.php

public function registerBundles()
{
$bundles = array(
// ...
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
);
}
```
Add the following lines at `app/config/config_dev.yml`:

assetic:
use_controller: false
```yaml
assetic:
use_controller: false
```
### Changing default values from templates
If you want to change any default value as for example `admin_skin` all you need to do is define the same at `app/config/config.yml` under `[twig]` section. See example below:

# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
admin_skin: skin-blue
```yaml
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
admin_skin: skin-blue
```

You could also define those values at `app/config/parameters.yml`:

admin_skin: skin-blue
```yaml
admin_skin: skin-blue
```

and then use as follow in `app/config/config.yml`:

# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
admin_skin: "%admin_skin%"
```yaml
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
admin_skin: "%admin_skin%"
```

AdminLTE skins are: skin-blue (default for this bundle), skin-blue-light, skin-yellow, skin-yellow-light, skin-green, skin-green-light, skin-purple, skin-purple-light, skin-red, skin-red-light, skin-black and skin-black-light. If you want to know more then go ahead and check docs for AdminLTE [here][1].

Expand Down

0 comments on commit d81ae29

Please sign in to comment.