문제

I'm using this plugin with CakePHP --> TwitterBootstrap, everything works like a glow except I can't change the layouts. ie. index, add and such.

I have a model called Cinema and have created this with cake bake and the same thing with Views/Cinemas

This is my controller:

<?php
App::uses('AppController', 'Controller');
/**
 * Cinemas Controller
 *
 */
class CinemasController extends AppController {

/**
 *  Layout
 *
 * @var string
 */
    public $layout = 'bootstrap';

/**
 * Scaffold
 *
 * @var mixed
 */
    public $scaffold;

}

Have i overridden CakePHPs routes into some special scaffolding template?

도움이 되었습니까?

해결책

By defining public $scaffold; in your controller, you tell Cake that you want to enable Scaffolding mode, which allows you to easily insert/edit/delete some records. The scaffolding mode always uses your "default" layout.

In other words, by defining the public $scaffold; variable, you "overrule" your layout. Scaffolding mode doesn't adopt that setting. Simply remove the public $scaffold; line to get back to your bootstrap layout.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top