News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stefan Koopmanschap's Blog:
Removing stylesheets in symfony 1
April 27, 2011 @ 08:58:49

Stefan Koopmanschap has a quick post to his blog with a handy, not immediately obvious tip for the Symfony users out there - how to remove site-wide stylesheets in a Symfony application so it's not loaded automatically.

Today I encountered a situation I've not encountered before: I have a project-wide stylesheet that should be used for everything, except one specific module that has different (brandable) stylesheets. I created a view.yml for this module with a different stylesheet, but of course the configuration files are merged so it doesn't actually overwrite the main stylesheet file. And this wasn't really what I needed here.

His technique involves a change to the main view.yml configuration file with a special syntax to remove the CSS file with a negation. A snippet is included to illustrate. You can find out more about view configuration in this chapter of the "Definitive Guide to Symfony".

0 comments voice your opinion now!
remove styesheet symfony css


blog comments powered by Disqus

Similar Posts

DZone.com: The Wheel: Symfony Console

Symfony Blog: New in symfony 1.2: Small things matter

Symfony Blog: How do I use Propel 1.3 in symfony 1.1?

The Bakery: Five New Posts - Custom Views, CSS, ViewInFile, ActsAs and Email Validation

Ryan Grove's Blog: Minify combines, minifies &caches JavaScript & CSS files to speed up page loads


Community Events





Don't see your event here?
Let us know!


language community opinion unittest install symfony2 laravel threedevsandamaybe list developer introduction interview testing series experience release framework podcast code configure

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework