HOWTO: Symfony 1.4 – Only load an plugin for a given application

Sometimes you’ll want to include a plugin, such as an admin generator, that will load stylesheets or javascript files that you may not want loaded in all applications.

You could add the following to your template file: (apps/frontend/templates/layout.php)


But that just feels wrong. So instead, lets only load the plugin for the application that we want (config/ProjectConfiguration.class.php):

class ProjectConfiguration extends sfProjectConfiguration {
  public function setup() {
    if ( "admin" == sfConfig::get('sf_app') ) {

Posted in General

Leave a Reply

Your email address will not be published. Required fields are marked *