Giter VIP home page Giter VIP logo

cakelte-1's Introduction

CakeLTE: AdminLTE plugin for CakePHP 4.x

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require arodu/cakelte

Dependencies

Configuration

You can load the plugin using the shell command:

bin/cake plugin load CakeLte

Or you can manually add the loading statement in the src/Application.php file of your application:

public function bootstrap(){
    parent::bootstrap();
    $this->addPlugin('CakeLte');
}

How to use

use trait into src/View/AppView.php (Recomended)

namespace App\View;

use Cake\View\View;
use CakeLte\View\CakeLteTrait;

class AppView extends View{
  use CakeLteTrait;

  public $layout = 'CakeLte.default';

  public function initialize(): void{
      parent::initialize();
      $this->initializeCakeLte($options = []);
      //...
  }
}

or you can extends from CakeLteView

namespace App\View;

use Cake\View\View;
use CakeLte\View\CakeLteView;

class AppView extends CakeLteView{

  public function initialize(): void{
    parent::initialize();
    //...
  }
}

Inpunt options:

  //initializeCakeLte() \$options
  [
    'appName' => 'Cake<b>LTE</b>', // [string] default='Cake<b>LTE</b>'
    'appLogo' => 'CakeLte.cake.icon.png', // [string] default='CakeLte.cake.icon.png'
  ];

Options layouts

  • CakeLte.default
  • CakeLte.login
  • CakeLte.top-nav

Create code from bake

bin/cake bake all [command] -t CakeLte

bin/cake bake template [command] -t CakeLte login

To modify the template you can copy one or all the files within your project

Replace the files elements

  • Layouts
    • src/templates/layout/default.php
    • src/templates/layout/login.php
    • src/templates/layout/top-nav.php
  • Content info
    • src/templates/element/content/breadcrumb.php
    • src/templates/element/content/header.php
  • Header navbar
    • src/templates/element/header/main.php
    • src/templates/element/header/menu.php
    • src/templates/element/header/messages.php
    • src/templates/element/header/notifications.php
    • src/templates/element/header/search.php
  • Footer
    • src/templates/element/footer/main.php
  • Left sidebar
    • src/templates/element/sidebar/main.php
    • src/templates/element/sidebar/menu.php
    • src/templates/element/sidebar/user.php
  • Right sidebar
    • src/templates/element/aside/main.php

Page debug

Link to debug

echo $this->Html->link(__('CakeLTE debug page'), '/cake_lte/debug' );

// {your-url}/cake_lte/debug

Page Debug with starter layout

Page Debug with top-nav layour

cakelte-1's People

Contributors

arodu avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.