bolt: [BUG/ MISSING] Cannot modify backend contenttype listing view

With this files, you can change the rows of the contenttype listing in the backend.

With a composer installation, where all Bolt files live in vendor you cannot use this anymore. When I create the exact same folder path in my app folder, the templates won’t be loaded. But it works fine when I edit them in the vendor folder.

So the files in my own app folder are just not loaded.

Details

  • Relevant Bolt Version: 3.0.0 beta 1
  • Install type: Composer install
  • PHP version: 7.0
  • Used webserver: php dev server

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 18 (15 by maintainers)

Most upvoted comments

  • Yeah they definitely still need refactoring. There’s too much logic in twig.
  • It is confusing for users because the project structure wasn’t designed with composer in mind. It is on the roadmap to change with 4.0.
  • Config and ContentTypes are getting refactored in 3.x (next) which could lead to changes here.

To make it work, you’ll need to add a directory to the twig loader. Unfortunately, we don’t really have a defined spot for users to add php code, but here’s the snippet:

// After $app->initialize()
$app['twig.loader.filesystem'] = $app->share(
    $app->extend(
        'twig.loader.filesystem',
        function ($filesystem, $app) {
            $filesystem->prependPath(   $dir   , 'bolt');

            return $filesystem;
        }
    )
);