Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How To - Bypass default template from bootstrap-ui #364

Open
1 of 3 tasks
Dragon67Adpc88 opened this issue Feb 28, 2022 · 0 comments
Open
1 of 3 tasks

How To - Bypass default template from bootstrap-ui #364

Dragon67Adpc88 opened this issue Feb 28, 2022 · 0 comments

Comments

@Dragon67Adpc88
Copy link

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • BootstrapUI Version: Last realease.

  • Bootstrap Framework Version: Last version

  • jQuery: Last version

  • Platform and Target: wampserver

What you did

I have install the plugin :

  • composer require friendsofcake/bootstrap-ui 👍
  • bin/cake plugin load BootstrapUI 👍
  • bin/cake bootstrap install 👍
  • bin/cake bootstrap modify_view 👍
  • bin/cake bootstrap copy_layouts 👍
  • I use trait 👍
    declare(strict_types=1);

namespace App\View;

use BootstrapUI\View\UIViewTrait;
use Cake\View\View;

class AppView extends View
{
use UIViewTrait;

/**
 * Initialization hook method.
 */
public function initialize(): void
{
    parent::initialize();

    // Call the initializeUI method from UIViewTrait
    $this->initializeUI();
}

}

  • I have override this behavior in two ways 👍 Assign a layout to the template with $this->setLayout('layout'). as into controller $this->viewBuilder()->setLayout('default'); + 👍 Disable auto loading of the layout in BootstrapUI\View\UIViewTrait by adding $this->initializeUI(['layout' => false]); to your AppView's initialize() function.

Expected Behavior

My problem is that :

  • My default template is contain into the bootstrap-ui default template
  • I want only use my template with helper from trait, not the bootstrap-ui default

Actual Behavior

EXPLAIN WHAT IS ACTUALLY HAPPENING, HERE.

Before you open an issue, please check if a similar issue already exists or has been closed before.

P.S. Remember, an issue is not the place to ask questions. You can use Stack Overflow
for that or join the #cakephp channel on irc.freenode.net, where we will be more
than happy to help answer your questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant