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

Unable to overwrite layout files (v1.1.1 / cakephp4.5.2) #73

Closed
katouam opened this issue Jan 18, 2024 · 2 comments
Closed

Unable to overwrite layout files (v1.1.1 / cakephp4.5.2) #73

katouam opened this issue Jan 18, 2024 · 2 comments

Comments

@katouam
Copy link

katouam commented Jan 18, 2024

Thanks for this wonderful AdminLTE plugin.

I was able to overwrite correctly the folders under the "templates/element/" dir.
But The Layout files ( "templates/layout/" ) were not able to overwrite.

Layouts

  • copy from
    vendor/arodu/cakelte/templates/layout/default.php

  • to
    templates/layout/default.php
    ... I customized this file

Do I need any settings?
I use trait into src/View/AppView.php (Recomended)

My environment.

  • cakephp/cakephp 4.5.2
  • arodu/cakelte v1.1.1

overwrite

@katouam
Copy link
Author

katouam commented Jan 18, 2024

I found a solution.
But I don't know this is the correct way to do it...

I referred to the following method.
https://book.cakephp.org/4/en/plugins.html#plugin-templates

  1. Create a plugin/CakeLte directory
    {myproject}/templates/plugin/CakeLte/layout

  2. Place layout files.
    {myproject}/templates/plugin/CakeLte/layout/default.php

By the way,
I tried moving elements under the plugin directory,

example
{myproject}/templates/plugin/CakeLte/element/header/main.php
{myproject}/templates/plugin/CakeLte/element/header/menu.php
{myproject}/templates/plugin/CakeLte/element/content/header.php

These were overwritten.

If anyone knows, please comment if this method is correct.

over2

@arodu
Copy link
Owner

arodu commented Jan 18, 2024

I found a solution. But I don't know this is the correct way to do it...

Yes.. that is the correct way to do it...

@arodu arodu closed this as completed Jan 18, 2024
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

2 participants